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:
Senén Rodero Rodríguez
2023-05-23 16:33:52 +02:00
committed by Senén Rodero Rodríguez
parent e5a6a5bf1d
commit 3e9f2b8319

View File

@@ -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();
}