When permanent is true, it would be useful to hide tooltips under certain zoom levels. Is it visible to provide such feature as build-in in leaflet?
+1
There's a lot of functions you might want to trigger at different zoom levels, and I don't think we should add all those to Leaflet's core. It's actually not that hard to do this already, see this example:
http://playground-leaflet.rhcloud.com/sere/edit?html,output
Can probably be cleaned up a bit, but I hope the general idea is clear.
@perliedman Very clear; thanks for the demo!
Hello Guys,
I'm new to this framework, is there any way to hide/close permanent tooltip at the default zoom level?
The mentioned the example only works there is a zoom level change.
Regards
JJ
@knightg if you check the example, it uses the map's closeTooltip method to hide a permanent tooltip, and then uses addLayer to show it again.
@perliedman its a broken link http://playground-leaflet.rhcloud.com/sere/edit?html,output
@nouphaltklm yeah, sorry, it appears the playground has gone down and apparently the code is lost with it.
@nouphaltklm This should be the code: https://stackoverflow.com/a/42373256/
Most helpful comment
@nouphaltklm This should be the code: https://stackoverflow.com/a/42373256/