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
Problem: I use leaflets flyToBounds function, and attach a listener for the zoomend event. In the event callback, i add a cluster of markers to the map. I get an error message Uncaught TypeError: Cannot read property 'lat' of undefined.
Steps to reproduce:
Open dev console (i'm using chrome)
Click the zoom button.
Click the world button.
The error should be thrown by now, if not, repeat steps 2 and 3.
In the given fiddle, could you please replace the sources fromleaflet.js and leaflet.markercluster.js with leaflet-src.js and leaflet.markercluster-src.js accordingly? This will allow to do some debugging in the console.
jsFiddle: https://jsfiddle.net/k4b56h79/14/
Problem: I use leaflets flyToBounds function, and attach a listener for the
zoomend
event. In the event callback, i add a cluster of markers to the map. I get an error messageUncaught TypeError: Cannot read property 'lat' of undefined
.Steps to reproduce:
The error should be thrown by now, if not, repeat steps 2 and 3.
I've managed a workaround by wrapping the
zoomend
callback with a 50 ms timeout, like sohttps://jsfiddle.net/guanzo/k4b56h79/12/
It also works if i remove the flyToBounds function entirely.
https://jsfiddle.net/guanzo/k4b56h79/13/
The text was updated successfully, but these errors were encountered: