hosuaby / Leaflet.SmoothMarkerBouncing

Smooth animation of marker bouncing for Leaflet.
BSD 2-Clause "Simplified" License
146 stars 28 forks source link

It is not possible to change the size of the icon when bouncing #26

Closed ironbone closed 2 years ago

ironbone commented 4 years ago

For a bouncing marker with an icon, there is no effect when setting a new icon (in my case I wanted to resize the icon when zooming). It also does not work after calling .stopBouncing();

hosuaby commented 4 years ago

Yes. Plugin do not recalculate animation when you set a new icon to marker. It's not very common situation. As alternative, you can just replace one marker by another (with different icon). If you find an elegant solution to handle icon change in plugin, don't hesitate to make a PR.

hosuaby commented 2 years ago

It is possible to change icon of bouncing marker starting from version 3.0.1.