[OpenLayers-Commits] r12281 -
sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Mon Aug 29 04:37:47 EDT 2011
Author: erilem
Date: 2011-08-29 01:37:46 -0700 (Mon, 29 Aug 2011)
New Revision: 12281
Modified:
sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js
Log:
add a getAvailableZoom function to Layer.Grid
Modified: sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js
===================================================================
--- sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js 2011-08-29 08:29:34 UTC (rev 12280)
+++ sandbox/camptocamp/clientzoom/lib/OpenLayers/Layer/Grid.js 2011-08-29 08:37:46 UTC (rev 12281)
@@ -312,6 +312,18 @@
},
/**
+ * Method: getAvailableZoom
+ * Return the zoom value corresponding to the closest available
+ * resolution.
+ *
+ * Returns:
+ * {Number} The available zoom.
+ */
+ getAvailableZoom: function() {
+ return this.map.getZoomForResolution(this.getAvailableResolution());
+ },
+
+ /**
* Method: transformDiv
* Transform the layer div.
*
More information about the Commits
mailing list