question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

All markers rendering when mouse moves.

See original GitHub issue

I 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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

2reactions
thunderkidcommented, Aug 31, 2016

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 new noRenderOnHover property would be nice. (Or even require renderOnHover 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.

0reactions
istarkovcommented, Aug 31, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found