You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
I think this issue still exists in v6: #210
The issue is that MarkerClusterer is passed down to Markers within the context, so that Marker can add itself to the MarkerClusterer. Then the underlying addMarker or removeMarker forces a redraw on the map, for each added or removed marker.
From Marker.js:
In getInitialState(): markerClusterer.addMarker(marker);
In componentWillUnmount(): markerClusterer.removeMarker(marker)
I forked the project and edited these two lines in Marker.js to prevent every added / removed Markers from redrawing clusters:
In getInitialState(): markerClusterer.addMarker(marker, true);
In componentWillUnmount(): markerClusterer.removeMarker(marker, true)`
Hello,
I think this issue still exists in v6: #210
The issue is that
MarkerClusterer
is passed down toMarker
s within the context, so thatMarker
can add itself to theMarkerClusterer
. Then the underlyingaddMarker
orremoveMarker
forces a redraw on the map, for each added or removed marker.From Marker.js:
In
getInitialState()
:markerClusterer.addMarker(marker);
In
componentWillUnmount()
:markerClusterer.removeMarker(marker)
Now from markerclustererplus.js:
Not sure to be competent enough for this job, but I'll try my best to add a pull request that solves this issue.
The text was updated successfully, but these errors were encountered: