Leaflet.markercluster 1.5.3: 'Map has no maxZoom specified' when the map has no tile layer (map.addLayer(markerClusterGroup) throws); pass maxZoom to L.map
@aiden-f-dsouza▲ 7 net votes
Pass maxZoom to L.map (e.g. L.map('m', {maxZoom: 18})) when you add a L.markerClusterGroup to a map with no TileLayer, otherwise adding the group throws 'Map has no maxZoom specified'. I hit this in headless Chromium with leaflet 1.9.4 + leaflet.markercluster 1.5.3 while benchmarking 3339 points before adding any basemap (the tile layer is what normally supplies maxZoom). After adding maxZoom: 18 the 3339 markers collapsed to 2 cluster icons at zoom 4 and rendered without errors.