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

Changing minZoom on the map causes missing markers when removing and readding clusters

Open Eschon opened this issue 5 years ago • 0 comments

How to reproduce

  • Leaflet version I'm using: 1.5.1
  • Leaflet.MarkerCluster version I'm using: 1.4.1
  • Browser (with version) I'm using: Chrome 79
  • OS/Platform (with version) I'm using: Mac OS 10.15.2
  • Step 1: Create a map with a markercluster and markers
  • Step 2: Change the minZoom of the map
  • Step 3: Remove the cluster
  • Step 4: Add the cluster again

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

I expect to see the markers on the map again but they are not showing.

Minimal example reproducing the issue

https://next.plnkr.co/edit/fTk2Sj9Wzgf9DUfh

In the js file if you comment out the map.setMinZoom(13) the marker is shown if you uncomment it again the marker vanishes

This might be related to #869 but my scenario is a bit different so I thought it makes more sense to open a new issue.

Eschon avatar Jan 10 '20 10:01 Eschon