Leaflet.markercluster
Leaflet.markercluster copied to clipboard
Browser freezes when maxZoom is to high
trafficstars
const map = L.map('map', {
center: L.latLng([48.78232, 9.17702]),`
maxZoom: 180
});
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.
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
I'm experiencing exactly the same issue. If I add max zoom to the map config, the map renders.