openlayers display projection

المشرف العام

Administrator
طاقم الإدارة
I'm displaying coordinates in EPSG:900913 using ol.control.MousePosition() with OSM.I'd like to convert these on the fly in another EPSG:2154.

I call in the header :

Then my html :

Proj4js.defs["EPSG:2154"] = "+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs";var map = new OpenLayers.Map({ div: "map", projection: "EPSG:900913", controls:[ new OpenLayers.Control.LayerSwitcher({'ascending':false}), new OpenLayers.Control.ScaleLine({ 'geodesic': "true" }), new OpenLayers.Control.Navigation(), new OpenLayers.Control.KeyboardDefaults(), new OpenLayers.Control.MousePosition( {displayProjection: new OpenLayers.Projection("EPSG:2154")} ) ] });

أكثر...
 
أعلى