yuzhva / react-leaflet-markercluster

React wrapper of the official Leaflet.markercluster for react-leaflet
https://yuzhva.github.io/react-leaflet-markercluster/
MIT License
284 stars 101 forks source link

Cluster marker count not decreasing when removing marker and incorrectly shows spider legs #160

Closed AndriusOL closed 2 years ago

AndriusOL commented 3 years ago

Hello. I am dynamically updating markers . I am passing array of markers between MarkerClusterGroup tags. I noticed that when passing updated array with markers that already in cluster (markers have unique key) the total number increases instead of recalculating marker unique markers count. Removing markers does not impact number as well and it stays as is without decrementing. Also redundant spider legs are present with no markers attached.

In this example I was adding and removing same marker for 10 times and passing updated array (newly initialized each)

image

image

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.