Igor-Vladyka / leaflet.motion

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

bind a pop or tooltip to marker #28

Closed dolorain closed 2 years ago

dolorain commented 2 years ago

This plugin solves a lot of my problems, but I don't know how to bind the pop ir tooltip to the marker. All I can think of is that the pop moves with the marker, could this be a problem? like this. image

dolorain commented 2 years ago

I solved it.

chenshuqun commented 1 year ago

how to solve it?

aslanispavlos commented 1 year ago

@chenshuqun

Probably a bit late of response, but it might also help others.

How I did it was,

const motionPolyline = L.motion.polyline(.....).addTo(map);

motionPolyline.getMarker().bindTooltip('Hello World!').openTooltip()