All markers rendering when mouse moves.
See original GitHub issueI have a map with 300 markers. When I move the cursor over one marker, all 300 markers are re-rendered. With a small number of markers this doesn’t matter, but with hundreds it gives a significant performance lag. The re-rendering seems to occur even when onChildMouseEnter
and onChildMouseLeave
are absent.
Is this the expected behavior? Is there a way to prevent it?
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top Results From Across the Web
New Features in REAPER v6.64 - render marker bounds
Here's what's new in REAPER 6.64 including changes to markers, rendering, and the Media Explorer00:00 - Intro00:27 - selecting markers ; ...
Read more >Capture and Leverage Mouse Events on Leaflet Map - Medium
When the user moves the mouse from a polygon to the background map: In this case, we see the mouseout event triggered, but...
Read more >Interactivity of mapbox markers/points depending on the ...
Right. I have used that setFeatureState method today. Works great. It's only that css transitions are unavailable if you want to emphasize ...
Read more >Events | Maps JavaScript API - Google Developers
User events (such as "click" mouse events) are propagated from the DOM to the Maps JavaScript API. These events are separate and distinct...
Read more >Mouse move and click events — Matplotlib 3.6.2 documentation
An example of how to interact with the plotting canvas by connecting to move and click events. ... This example exercises the interactive...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Ok, thanks. For me, adding the
experimental
tag improves performance significantly, for both development and production builds. With 1000 markers on a desktop machine there is now almost no perceptible lag. (Although I admit that with 4000 markers the lag is still very bad at ~500ms. I don’t know whether I can improve that. I’m investigating further.)I have a request - if you deprecate the
experimental
property in the future, perhaps preserving this particular feature as a newnoRenderOnHover
property would be nice. (Or even requirerenderOnHover
so that the default behavior is simpler with higher performance.) I know it’s not significant for small numbers of markers, but extra performance is always nice and sometimes essential. To me it also just seems cleaner that way, though I don’t know anything about your undocumented $ properties.The same math as in how to draw polygons https://github.com/istarkov/google-map-react/issues/62 And may be in other polygons issues