add displayProjection API Property on the Map, and on relevant controls.

Spherical mercator example now makes use of this, displaying coordinates 
in lon/lat instead of meters, and permalink/argparser now work in lon/lat
as well. this functionality will make using SphericalMercator easier for
a number of applications. 
r=tschaub (Closes #1036)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@5519 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2007-12-19 23:36:34 +00:00
parent 811e35cff3
commit acc8cfc0f2
6 changed files with 117 additions and 14 deletions
+4 -1
View File
@@ -25,7 +25,8 @@
function init(){
var options = {
projection: "EPSG:900913",
projection: new OpenLayers.Projection("EPSG:900913"),
displayProjection: new OpenLayers.Projection("EPSG:4326"),
units: "m",
maxResolution: 156543.0339,
maxExtent: new OpenLayers.Bounds(-20037508, -20037508,
@@ -104,6 +105,8 @@
yahoo, yahoosat, yahoohyb, mapnik, wms, vector]);
map.addControl(new OpenLayers.Control.LayerSwitcher());
map.addControl(new OpenLayers.Control.EditingToolbar(vector));
map.addControl(new OpenLayers.Control.Permalink());
map.addControl(new OpenLayers.Control.MousePosition());
map.zoomToMaxExtent()
}