Skip to content Skip to sidebar Skip to footer

Best Way To Make Marker Resizable In Leaflet

I am trying to resize my markers every time the map is zoomed in or out. Currently I am using this approach: Iterate all markers in zoomend method. get current icon size Perform

Solution 1:

Looks like there are several previous posts that you guide you:

As for your bug, instead of reading the current icon size value at "zoomstart" event, you might better remember the previous zoom value and read it only at "zoomend" event. I am not sure the "zoomstart" event is fired only once when you scroll (to zoom in/out) successively, while the "zoomend" event may be fired only at the very end.


Post a Comment for "Best Way To Make Marker Resizable In Leaflet"