diff --git a/leaflet-iiif.js b/leaflet-iiif.js index 8f589eb..014d5fd 100644 --- a/leaflet-iiif.js +++ b/leaflet-iiif.js @@ -139,8 +139,11 @@ L.TileLayer.Iiif = L.TileLayer.extend({ }; // Calculates maximum native zoom for the layer - _this.maxNativeZoom = Math.max(ceilLog2(_this.x / _this.options.tileSize), - ceilLog2(_this.y / _this.options.tileSize)); + _this.maxNativeZoom = Math.max( + ceilLog2(_this.x / _this.options.tileSize), + ceilLog2(_this.y / _this.options.tileSize), + 0 + ); // Enable zooming further than native if maxZoom option supplied if (_this._customMaxZoom && _this.options.maxZoom > _this.maxNativeZoom) {