Load markers cluster layer by chunks
In order to avoid locking the browser for a long time. when there are a lot of markers in the map: https://github.com/Leaflet/Leaflet.markercluster#handling-lots-of-markers
This commit is contained in:
committed by
Senén Rodero Rodríguez
parent
e5a6a5bf1d
commit
3e9f2b8319
@@ -23,7 +23,7 @@
|
||||
editable = $(element).data("marker-editable");
|
||||
markerClustering = $(element).data("marker-clustering");
|
||||
if (markerClustering) {
|
||||
markers = L.markerClusterGroup();
|
||||
markers = L.markerClusterGroup({ chunkedLoading: true });
|
||||
} else {
|
||||
markers = L.layerGroup();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user