New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ask for feature: add option to RControl.RLayers to make it non-collapsable. or is it already possible? #69
Comments
You can submit a PR, but otherwise you can simply pass an empty element for the collapse button and then manually click it once at initialization: const ref = React.useRef<RControl.RLayers>(null);
React.useEffect(() => {
if (ref.current) ref.current.clickCollapse();
}, [ref.current]);
return <RControl.RLayers ref={ref} element={<span />} />; |
Hello Thanks, it is working. The only drawback I see is that it trigger a re-render of the map. ( I am trying to figure out what trigger a map re-render (i.e. is it normal or is my code broken), like adding features inside a RLayerVector... ) |
Can you post your code? |
Hello I have another question on the layer control component: if it contains just one layer, by default the layer is selected and visible, perfect, But what if I want to hide this layer? Deselecting it is not possible, do you have some code that can do this when the used click on the layer checkbox? In my case I have 2 Rcontrol.Rlayer in my app: one for base maps + one for imagery layer(s) on top of the base map. I may have just one imagery layer, and I need in any case to have a show/hide capability on the imagery layer(s). Thanks for any info. |
You can set |
Hello
First: thank you for this great library. Very useful...
I would like to have the RControl.RLayers control expanded all the time.
is it already possible with the current code( or with css change)?
If not does it make sense to make a modif to pass some option like 'collapsable: true/false'?
Then as I some time I struggle a lot to find how to do use some component(and then maybe I use it in not the best way), is it possible to contact you directly (without abusing of your time of course). Or is there some discussion group or equivalent somewhere?
Thanks
best regards
Gilles (gilou3000@hotmail.com)
The text was updated successfully, but these errors were encountered: