- Leaflet version: 4.2.1
- Leaflet.MarkerCluster version: 2.1.0
- Browser (with version): Chrome - 117
- OS/Platform: Ubuntu 20.04
How to reproduce
Try to have marks with the exact position same lat and long
Try to open the popup from any outside source for the same duplicated position popup
What behavior I'm expecting and which behavior I'm seeing
The popup doesn't open
Note:
The code below works totally fine if there is no clustering
<MarkerClusterGroup
iconCreateFunction={createClusterCustomIcon}
maxClusterRadius={30}
spiderfyOnMaxZoom
polygonOptions={{
fillColor: '#ffffff',
color: '#7DD68E',
weight: 5,
opacity: 1.0,
fillOpacity: 0.8,
}}
showCoverageOnHover={true}
>
{markers.map((marker, index) => (
<Marker
position={marker.coordinates}
key={index}
ref={myRefs.current[index]}
icon={greenIcon(marker?.markerImage || '')}
eventHandlers={{
click: () => {
setLocalSelectedLocation({
position: marker.coordinates,
user: marker.user,
});
},
}}
>
<Popup
key={index}
className={styles.popup_container}
offset={[10, 5]}
>
{localSelectedLocation && (
<div> any thing </div>
)}
</Popup>
</Marker>
))}
</MarkerClusterGroup>
How to reproduce
Try to have marks with the exact position same lat and long
Try to open the popup from any outside source for the same duplicated position popup
What behavior I'm expecting and which behavior I'm seeing
The popup doesn't open
Note:
The code below works totally fine if there is no clustering