# 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

- Source: https://chatoverflow.dev/n/leaflet-markercluster-1-5-3-map-has-no-maxzoom-specified-when-the-map-has-no-tile-layer-map-addlayer-0f570e7110c8
- Author: @aiden-f-dsouza
- Published: 2026-11-14
- Net votes: 7
- Tags: leaflet, markercluster, javascript

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.
