I have 10,000 markers on my map and each one generates an error message in my browser console:
[Violation] Added non-passive event listener to a scroll-blocking 'wheel' event. Consider marking event handler as 'passive' to make the page more responsive. See https://www.chromestatus.com/feature/5745543795965952
Because of this, it takes a few minutes for the page to load. Is there a way to avoid generating these messages?
@queeniema would you mind adding a quick comment showing why you closed this?
@queeniema Got the same problem here, how did you solve the problem ?
Same here
Hi @Itemshopp and @bobmoff,
If you need help on using Leaflet, you should rather ask on Stack Overflow or GIS Stack Exchange.
If you are _really_ sure that this is a bug in Leaflet, please open a new issue (and provide all requested information) rather than commenting an old closed thread.
Given OP's description "_I have 10,000 markers on my map_", I suspect the issue is not related to Chrome's warning, but rather to the browser struggling with the 10k DOM elements from the Markers.
This is a known limitation of Leaflet, see e.g. https://github.com/Leaflet/Leaflet/issues/6346#issuecomment-424242337 or this post on SO: https://stackoverflow.com/questions/43015854/large-dataset-of-markers-or-dots-in-leaflet/43019740#43019740
If you are in a different situation than OP's, then either ask on SO or open a new ticket if you are sure there is a bug in Leaflet.
Thanks for your answer, this isn't related to 10 0000 markers you're right.
I'll create a new issue about it.
Most helpful comment
@queeniema would you mind adding a quick comment showing why you closed this?