Poor performance with many markers
See original GitHub issue- I’m reporting a bug, not asking for help; support questions like “How can I do X with Leaflet?” will be closed (use Stack Overflow or gis.stackexchange.com for questions)
- I’ve looked at the documentation to make sure the behaviour is documented and expected
- I’m sure this is a Leaflet code issue, not an issue with my own code nor with the framework I’m using (Cordova, Ionic, Angular, React…)
- I’ve searched through the issues to make sure it’s not yet reported
How to reproduce
- Leaflet version I’m using: 1.3.4
- Browser (with version) I’m using: Chromium 68
- OS/Platform (with version) I’m using: Debian Buster
- Place many markers to the map (eg. 1000)
- Move or zoom the map
What behaviour I’m expecting and which behaviour I’m seeing
Start of the movement is delayed and eats 100% of the CPU core. The same for the zoom. Delay si caused by getBoundingClientRect
:
Minimal example reproducing the issue
- this example is as simple as possible
- this example does not rely on any third party code
Issue Analytics
- State:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top Results From Across the Web
Leaflet getting slow when there are huge amount of custom ...
A common way is to use Marker Clustering. This way your huge amount of markers gets grouped into a smaller amount while still...
Read more >Performance – Markers (500+) showing up delayed / slowly
Hello there,. we are experiencing quite a delay from the inital page- / mapload to the markers showing up. We have around 500...
Read more >When does combining markers improve classification ... - NCBI
We find that an uncorrelated continuous marker with moderate performance on its own usually yields only minimally improved performance. We ...
Read more >Optimization Guide | Google Maps Platform
Optimization enhances performance by rendering many markers as a single static element. This is useful in cases where a large number of markers...
Read more >High performance markers on Leaflet map [closed]
If not, any other way I can get better performance with that many markers? I tried with a conditionalLayer, but it's too slow...
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 FreeTop 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
Top GitHub Comments
If you need to draw many markers, you can try Leaflet.PixiOverlay plugin. (i’m the plugin author by the way)
https://gitlab.com/IvanSanchez/Leaflet.GLMarkers