Leaflet / Leaflet.markercluster

Marker Clustering plugin for Leaflet
MIT License
3.97k stars 1k forks source link

There is no way to animate marker movement #963

Open Omnistas opened 5 years ago

Omnistas commented 5 years ago

How to reproduce

What behaviour I'm expecting and which behaviour I'm seeing

Marker movement is not animated when used .markerClusterGroup() (even worse when using JS animation). According to my assumptions, this happens due to the re-creation of the div-container with markers each time (leaflet-marker-pane as default).

Is there any way to avoid this? It may be possible to set the timeout for clustering markers equal to the time of 1 cycle of the animation or something like that?

Minimal example reproducing the issue

Using http://leafletjs.com/edit.html or any other jsfiddle-like site.

https://plnkr.co/edit/hZ50IHm9g9tBdivrHLhU?p=preview

dsldiesel commented 3 years ago

Having the same issue, I believe setLatLng should animate markers if using something like :

.leaflet-marker-pane > * {
  -webkit-transition: transform .3s linear;
  -moz-transition: transform .3s linear;
  -o-transition: transform .3s linear;
  -ms-transition: transform .3s linear;
  transition: transform .3s linear;
}

But it does not animate with clustering :(

dsldiesel commented 2 years ago

Please, could we just get some update on this issue? I've been expecting at least a plan on this issue so I can decide wether to wait for the fix or choose an alternative.