diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 5b98147b32..06d2aab9ef 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -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"