Igor-Vladyka / leaflet.motion

A simple tool to animate polylines and polygons in different way
https://igor-vladyka.github.io/leaflet.motion/
MIT License
207 stars 44 forks source link

check Layer type before calling setLatLngs #20

Closed mabi closed 2 years ago

mabi commented 3 years ago

Executing the demo I get the following error: Uncaught TypeError: l.setLatLngs is not a function here: https://github.com/Igor-Vladyka/leaflet.motion/blob/77870c8baaf96b67f9c0f70259f73191e752382a/src/layer/leaflet.motion.seq.js#L79 I suggest adding a type check e.g. if(l instanceof L.Polyline){ ... }

Igor-Vladyka commented 2 years ago

WIll be fixed in next version very soon, thanks