-
Notifications
You must be signed in to change notification settings - Fork 10
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
Charts don't go away when overlay is deactivated in L.control.layers #6
Comments
I would like to give this a bump, currently it isn't possible to remove charts from the map without using hacks like the above. It would be nice if L.minichart would respect the removeLayer-function call as all other layers do. |
Hi, Sorry if my answer comes very late. Is this still a problem? With Leaflet 1.3.1, I can correctly add and remove "minichart" layers. The following code works for me: mylayer = L.minichart([0, 0], {data: 1234, type:"pie", labels:"auto"}).addTo(map)
map.removeLayer(mylayer) Are you using a different version of leaflet or doing something different? |
Hi Francois, |
The problem has actually been fixed in version 0.2.5 by @bthieurmel . Thank you for your feedbacks. |
If you have a layer control, deactivating any charts layer never actually hides them like it should.
I had to add this to make it work (I have all my charts in an L.layerGroup):
The text was updated successfully, but these errors were encountered: