Fri, 08/04/2017 - 00:23
#1
Map freezezes when loading about (13000) markers
Hi,
We are using leaflet API to populate around 13000 markers.
We found a problem while rendering the markers as it freezes the browser(Chrome) - often requiring us to use task manager and kill process.
We tried a method (In loop):
var marker = new L.Marker(locations, { icon: new markerIcon() });
marker.desc = datum.d;
map.addLayer(marker);
Could you suggest if there is an issue; the way we are using leaflet API? Please advise.
Thank you,
Rahul
Fri, 08/04/2017 - 06:48
13,000 objects in JavaScript
13,000 objects in JavaScript can bog down a browser. 13,000 markers on a map can easily bring a browser to its knees. There are several methods to show that large data sets on a map without crushing it: reduce the number of markers, only display markers within the viewport at certain zoom levels, heatmap, clusters, and others.