Hi all, Has anyone had any success displaying latlong coordinates for a projected map? The relevant code is below... all I get is "Nan, Nan" in the coordinate display. Is there something obvious that I should try?
====== begin listing ======== <script src="./lib/OpenLayers.js"></script> <script src="./lib/proj4js.js"></script> <script type="text/javascript"> Proj4js.defs["EPSG:4326"] = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs "; Proj4js.defs["EPSG:54009"] = "+proj=moll +lon_0=0 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"; var map; function init(){ map = new OpenLayers.Map( 'map', { restrictedExtent: new OpenLayers.Bounds(-18040095,-9020047,18045393,9022696), maxExtent: new OpenLayers.Bounds(-18040095,-9020047,18045393,9022696), maxResolution: 37984.724210526314, projection: new OpenLayers.Projection("EPSG:54009"), // have also tried just the string "EPSG:54009" units: 'm', controls: [ new OpenLayers.Control.PanZoomBar(), new OpenLayers.Control.Navigation(), new OpenLayers.Control.MousePosition( {displayProjection: new OpenLayers.Projection("EPSG:4326")}), new OpenLayers.Control.ScaleLine({units: 'mi'}), ], numZoomLevels: 8 } ); ====== end listing ======== -- ·´¯`·.¸. , . .·´¯`·.. ><((((º>`·.¸¸.·´¯`·.¸.·´¯`·...¸><((((º> "The best way to predict the future is to invent it." -- Alan Kay Matthew T. Perry http://www.perrygeo.net _______________________________________________ Users mailing list Users@openlayers.org http://openlayers.org/mailman/listinfo/users