From cbee6851c870a8a9047b2d5d193628ffe0e2904f Mon Sep 17 00:00:00 2001 From: Mattias Bengtsson Date: Thu, 14 Feb 2013 12:00:08 +0100 Subject: [PATCH] Don't expose getZoomLevels. --- src/map/Map.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/map/Map.js b/src/map/Map.js index ee74f1930..61881df00 100644 --- a/src/map/Map.js +++ b/src/map/Map.js @@ -271,10 +271,6 @@ L.Map = L.Class.extend({ return Math.min(z1, z2); }, - getZoomLevels: function () { - return this.getMaxZoom() - this.getMinZoom() + 1; - }, - getBoundsZoom: function (bounds, inside) { // (LatLngBounds, Boolean) -> Number bounds = L.latLngBounds(bounds); @@ -534,11 +530,15 @@ L.Map = L.Class.extend({ L.DomUtil.setPosition(this._mapPane, this._getMapPanePos().subtract(offset)); }, + _getZoomSpan: function () { + return this.getMaxZoom() - this.getMinZoom(); + }, + _updateZoomLevels: function () { var i, minZoom = Infinity, maxZoom = -Infinity, - oldZoomLevels = this.getZoomLevels(); + oldZoomSpan = this._getZoomSpan(); for (i in this._zoomBoundLayers) { if (this._zoomBoundLayers.hasOwnProperty(i)) { @@ -559,7 +559,7 @@ L.Map = L.Class.extend({ this._layersMinZoom = minZoom; } - if (oldZoomLevels !== this.getZoomLevels()) { + if (oldZoomSpan !== this._getZoomSpan()) { this.fire("zoomlevelschange"); } },