-
-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
Description
this is the code I use:
return (
<Pane name="addressesPane" className="addressesPane">
<MarkerClusterGroup
key={Date.now()}
chunkedLoading={true}
elementsPlacementStrategy="original-locations"
pane="housesPane"
showCoverageOnHover={false}
disableClusteringAtZoom={18}
spiderLegPolylineOptions={{
opacity: 0
}}
>
{houseMarkers}
{flatMarkers}
</MarkerClusterGroup>
</Pane>
)
marker code looks like this:
return <Marker
key={address.id}
position={[coords[1], coords[0]]}
icon={L.divIcon({
html: '<div class="w-4 h-4 rounded-full bg-green-500" style="width: 20px;height: 20px"></div>',
className: ''
})}
>
</Marker>
The markers show up correctly and get clustered. However if somewhere later the houseMarkers and flatMarkers are empty arrays, I see the component being called, but the markers stay on screen (I put logs right before the return of the component containing this code).
The only solution is to add key={Date.now} in MarkerClusterGroup.
this is happening in 5.0.0-rc.0
kkp-dev, soldatroket and barbalex