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

Method getAllChildMarkers() return only 1 marker when cluster contains 2 child

Open kadekval opened this issue 2 years ago • 0 comments

How to reproduce

  • leaflet version: 1.8.0
  • leaflet.markercluster: 1.5.3
  • react leaflet: 4.0.0
  • react: 18
  • OS: Macos Monterey
  • browser chrome: 103.0.5060.134

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

i am creating a cluster with its icon using pie chart, but i found some trouble when the cluster has 2 child, getAllChildMarkers() return only 1 marker when cluster contains 2 child

Screen Shot 2022-08-12 at 15 27 40 Screen Shot 2022-08-12 at 15 26 25

red line is the cluster has 2 child green line is the cluster has more than 2 child

Related Codes

I think the problem comes from here https://github.com/Leaflet/Leaflet.markercluster/blob/31360f226e1a40c03c71d68b016891beb5e63370/src/MarkerClusterGroup.js#L264-L270 why should there be a code to remove the marker?

kadekval avatar Aug 12 '22 07:08 kadekval