Commit scale-based methods back into trunk. Layers or Maps now support setting
a list of scales or resolutions in the options to the constructor, from which resolutions are calculated. Map now has a 'setScale' function which will allow you to zoom to as close to a given scale as possible. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1171 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -288,17 +288,6 @@ OpenLayers.Layer.Grid.prototype =
|
||||
/* */
|
||||
/********************************************************/
|
||||
|
||||
/**
|
||||
* @returns Degrees per Pixel
|
||||
* @type float
|
||||
*/
|
||||
getResolution: function() {
|
||||
var maxRes = this.map.getMaxResolution();
|
||||
var zoom = this.map.getZoom();
|
||||
|
||||
return maxRes / Math.pow(2, zoom);
|
||||
},
|
||||
|
||||
/** Calculates based on resolution, center, and mapsize
|
||||
*
|
||||
* @returns A Bounds object which represents the lon/lat bounds of the
|
||||
|
||||
Reference in New Issue
Block a user