avoiding markers animating into new position after a setView

802 views
Skip to first unread message

Alexandre Rousseau

unread,
Jul 10, 2013, 8:45:27 AM7/10/13
to leafl...@googlegroups.com
Is there a way, when calling setView on the map, to avoid animating the movement of the markers to their new (adjusted for new view settings) position? Not sure whether this is a leaflet or plugin (AnimatedMarker.js in the present case) issue.

Thanks in advance
Alex

Vladimir Agafonkin

unread,
Jul 10, 2013, 12:40:03 PM7/10/13
to leafl...@googlegroups.com
If you want to turn off the default Leaflet marker zoom animation, see http://leafletjs.com/reference.html#map-markerzoomanimation


--
 
---
You received this message because you are subscribed to the Google Groups "Leaflet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to leaflet-js+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Vladimir Agafonkin
http://agafonkin.com/en
+380 (93) 745 44 61

Alexandre Rousseau

unread,
Jul 10, 2013, 2:52:59 PM7/10/13
to leafl...@googlegroups.com
Thanks Vladimir. I had tried as much with no avail. I just ran a test and the setting works fine with standard leaflet markers. AnimatedMarker.js has a problem, then. Will see if I can hack it.

cfg.map = new L.Map('map',
{
maxZoom: 24,
markerZoomAnimation: false
dragging: true,
touchZoom: false,
scrollWheelZoom: false,
boxZoom: false,
keyboard: false,
zoomControl: false,
attributionControl: false,
closePopupOnClick: false,
trackResize: true
});

Alexandre Rousseau

unread,
Jul 10, 2013, 2:55:25 PM7/10/13
to leafl...@googlegroups.com
ehm... line in pasted code should have ended with a comma (as it did in the project; problem remains unsolved).

markerZoomAnimation: false,
Reply all
Reply to author
Forward
0 new messages