-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
<MarkerCluster> forces re-renders as <Marker> elements change #84
Comments
Hi @tlhunter Would you be able to share a minimal reproduction on vite.new/vue? |
A reproduction for this is attached to issue #85, in the performance section of this comment: #85 (comment) |
This is coming from upstream. Removing marker(s) will cause |
Perf is pretty good after grabbing 0.13.2. Closing. |
I have an application using this package to display maps and markers. Up until now it displayed the markers directly on the screen without clustering. The app uses a
v-for
to display a list ofMarker
elements. It also uses av-bind:key
on theMarker
elements so that when the user pans and elements are replaced, markers that were previously drawn aren't redrawn.Here's an example of the markers not being redrawn. Open this URL and pan around and you'll see that the markers don't jitter:
https://app.radar.chat/map/glbra-stem-pipeline/@43.74317,-84.30412,9z
Now, I've added support for
CustomMarker
on most of the maps. It appears that upon doing so, the markers are constantly being redrawn when the elements are updated. With every pan operations and replacement of data, all of theMarker
andCustomMarker
groups disappear then reappear as the browser repaints them. This even happens when the map is zoomed in and only nakedMarker
s that aren't currently clustered are displayed. Here's an example of this:https://app.radar.chat/map/sfpd/@37.78537,-122.40414,15z
Is there a way to get the
CustomMarker
s to not be repainted with every DOM update?Here is what the code looks like:
The text was updated successfully, but these errors were encountered: