Letting the map ask renderer for resolution.

This commit is contained in:
Tim Schaub
2012-07-08 20:56:36 -06:00
parent 4dfb5d0dee
commit 3d130d3325
2 changed files with 15 additions and 0 deletions
+8
View File
@@ -264,6 +264,14 @@ ol.Map.prototype.getResolutionForZoom = function(zoom) {
}
};
/**
* @return {number} the resolution for the map at the given zoom level
*/
ol.Map.prototype.getResolution = function() {
goog.asserts.assert(goog.isDef(this.renderer_));
return this.renderer_.getResolution();
};
/**
* @param {goog.math.Coordinate|{x: number, y: number}} pixel