You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to remove the legend from the control. My use case: I have users who will add raster images to the map from db search results. This could be a large number of images.
It would be very helpful to have an option "allowRemove" which would place an (X) on the "htmlLegend" control for the layer which would allow the user to remove the layer from the "l.control.layers" control. I know I can keep track of the ids and allow the user to remove the layer from somewhere else (like in your example) but this seems much more intuitive.
The text was updated successfully, but these errors were encountered:
Sorry for taking so long to get back to this. Turned out I didn't read your comment completely and missed the part that you mentioned you're already aware of the current way of removing legend.
Anyhow, I added support for allowRemove and it's in review (see #13). I'll let you know when it's updated on npm too.
I would like to be able to remove the legend from the control. My use case: I have users who will add raster images to the map from db search results. This could be a large number of images.
It would be very helpful to have an option "allowRemove" which would place an (X) on the "htmlLegend" control for the layer which would allow the user to remove the layer from the "l.control.layers" control. I know I can keep track of the ids and allow the user to remove the layer from somewhere else (like in your example) but this seems much more intuitive.
The text was updated successfully, but these errors were encountered: