This is needed to allow KaMap and WorldWind to work. It may need to be removed in cases where it's not appropriate, but prevents infinite loops in the meantime (I think).

git-svn-id: http://svn.openlayers.org/trunk/openlayers@817 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-06-28 02:21:30 +00:00
parent 38324e7295
commit 9ea5b2aa31

View File

@@ -305,6 +305,17 @@ OpenLayers.Layer.Grid.prototype = Object.extend( new OpenLayers.Layer(), {
addTile:function(bounds,position) {
// Should be implemented by subclasses
},
/**
* @returns Degrees per Pixel
* @type float
*/
getResolution: function() {
var maxRes = this.map.getMaxResolution();
var zoom = this.map.getZoom();
return maxRes / Math.pow(2, zoom);
},
/** @final @type String */
CLASS_NAME: "OpenLayers.Grid"