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:
crschmidt
2006-08-09 19:14:16 +00:00
parent e3df606001
commit 6efaf328e5
5 changed files with 120 additions and 30 deletions
-11
View File
@@ -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