Leaflet.markercluster icon indicating copy to clipboard operation
Leaflet.markercluster copied to clipboard

Animation is not working when i zoom in

Open peterkowalsky333 opened this issue 3 years ago • 1 comments

  • I am reporting a bug,

How to reproduce

  • Leaflet version I'm using:1.7.1
  • Leaflet.MarkerCluster version I'm using:1.4.1
  • Browser (with version) I'm using:Chrome
  • OS/Platform (with version) I'm using:Windows

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

I want to have animation when i zoom in like this example:

http://leaflet.github.io/Leaflet.markercluster/example/marker-clustering-realworld.388.html

Minimal example reproducing the issue

My markerClusterGroup configuration looks like this:

this.markerClusterGroup = L.markerClusterGroup({ removeOutsideVisibleBounds: true, animate: true,
      animateAddingMarkers: true });

I also included

L.DomUtil.TRANSFORM = 'webkitTransition';
and
L.DomUtil.TRANSITION= 'webkitTransition';

and i imported the css file

 <link rel="stylesheet" href="/bower_components/leaflet.markercluster/dist/MarkerCluster.css">

but still,when i zoom in i dont have animations like on the example

peterkowalsky333 avatar Nov 19 '20 10:11 peterkowalsky333

Hello,

it might be a bit late to share the solution, but I had the same problem and solved by simply importing both css files:

@import "~leaflet.markercluster/dist/MarkerCluster.css";
@import "~leaflet.markercluster/dist/MarkerCluster.Default.css";

It should include the animations needed for splitting and merging. I'm using leaflet 1.7.1 and leaflet.markercluster 1.5.3.

tsungweihsu avatar Jun 15 '22 21:06 tsungweihsu