restore minZoom and maxZoom check on _update

This commit is contained in:
Taro Matsuzawa 2015-06-02 13:01:50 +09:00
parent d45c7ddfec
commit 4399b8f935

View File

@ -393,12 +393,12 @@ L.GridLayer = L.Layer.extend({
// TODO move to reset // TODO move to reset
// var zoom = this._map.getZoom(); // var zoom = this._map.getZoom();
// if (zoom > this.options.maxZoom ||
// zoom < this.options.minZoom) { return; }
if (center === undefined) { center = map.getCenter(); } if (center === undefined) { center = map.getCenter(); }
if (zoom === undefined) { zoom = Math.round(map.getZoom()); } if (zoom === undefined) { zoom = Math.round(map.getZoom()); }
if (zoom > this.options.maxZoom ||
zoom < this.options.minZoom) { return; }
var pixelBounds = map.getPixelBounds(center, zoom), var pixelBounds = map.getPixelBounds(center, zoom),
tileRange = this._pxBoundsToTileRange(pixelBounds), tileRange = this._pxBoundsToTileRange(pixelBounds),
tileCenter = tileRange.getCenter(), tileCenter = tileRange.getCenter(),