Leaflet.markercluster icon indicating copy to clipboard operation
Leaflet.markercluster copied to clipboard

Browser freezes when maxZoom is to high

Open Falke-Design opened this issue 5 years ago • 3 comments
trafficstars

const map = L.map('map', {
  center: L.latLng([48.78232, 9.17702]),`
  maxZoom: 180
});

Falke-Design avatar Sep 18 '20 18:09 Falke-Design

This looks like a core Leaflet issue (and not a markercluster one). I know there are problems going beyond level 32 (due to int32 precision and such), but am unsurehow/where to check for this best.

IvanSanchez avatar Sep 19 '20 09:09 IvanSanchez

Core Leaflet: https://jsfiddle.net/falkedesign/1rLntbo5/ (working) With MarkerCluster: https://jsfiddle.net/falkedesign/xpjz53hf/6/ (freezing)

I only added:

const clusterMarker = L.markerClusterGroup();
var marker = L.marker([48.79232, 9.17702]);
// Also add a marker outside of the cluster
clusterMarker.addLayer(marker);

// Add cluster of markers to map
map.addLayer(clusterMarker);

Maybe MarkerCluster creating something for each zoom level

Falke-Design avatar Sep 19 '20 11:09 Falke-Design

I'm experiencing exactly the same issue. If I add max zoom to the map config, the map renders.

r00tat avatar Dec 23 '21 12:12 r00tat