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:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user