Leaflet.markercluster
Leaflet.markercluster copied to clipboard
Animation is not working when i zoom in
- 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
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.