最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - What is the maximum markers quantity in the Leaflet library on a standard browser? - Stack Overflow

programmeradmin0浏览0评论

I'm using Leaflet on standard conditions, let's say Firefox on a usual PC. What is the maximum markers quantity it can display at the same time?

I don't need an exact number, just to know capabilities, is near the 1000 dots, near 10.000 or can it display 100k without problems?

I'm using Leaflet on standard conditions, let's say Firefox on a usual PC. What is the maximum markers quantity it can display at the same time?

I don't need an exact number, just to know capabilities, is near the 1000 dots, near 10.000 or can it display 100k without problems?

Share Improve this question edited Dec 22, 2014 at 8:54 scai 21.5k4 gold badges59 silver badges80 bronze badges asked Dec 22, 2014 at 5:59 pan1kapan1ka 811 silver badge4 bronze badges 2
  • 1 I've shown 100,000+ markers, but using the L.MarkerCluster plugin to do so - Chrome may use up to 2GB-3GB or more to handle that many markers, however, and scrolling/zooming (redrawing) the map can get sluggish. When using clusters I wouldn't remend more than 50K markers, in general, and even that is a bit high in my opinion. For non clustered markers 4K seems to be OK. This site does it well: limits to 4K features, uses level of detail polygons, etc., to fake it: tree-map.nycgovparks – nothingisnecessary Commented Sep 16, 2019 at 22:09
  • Crap, nevermind about the NYC trees map - it used to use Leaflet, but now uses MapBoxGl.. probably because of the limitations of using Leaflet. Vector tiles probably the way to go for very large data sets – nothingisnecessary Commented Sep 16, 2019 at 22:19
Add a ment  | 

1 Answer 1

Reset to default 7

I guess the border is something like 1000 as it's getting hard for browsers to deal with huge amount of smal object instances. For example, if you load hundrets of point objects from a KML it's getting pretty slow at every JS webmap framework.

A better way to deal with that problem is to use server side ponents to filter the objects. For example stream simplified layers for low zoomlevels and just stream the nessary objects within your current map view via a bbox filter strategy.

发布评论

评论列表(0)

  1. 暂无评论