[OpenLayers-Users] Cloudmade transform

Mulone andrea.ballatore at ucd.ie
Tue Sep 29 05:27:35 EDT 2009


Hi guys,
I'm using OpenLayers with Cloudmade and I don't quite get the transform
thing.
In this bit of code I want to get the mouse click on the interface and
convert it to latlon, but I get very big numbers. What am I doing wrong
here?

             trigger: function(e) {
		var point = map.getLonLatFromPixel(e.xy);
		var lonlat = point.transform(epsg4326, map.getProjectionObject());
                alert("You clicked near " + lonlat.lat + " N, " + lonlat.lon
+ " E");
             }


Thanks for any hint!
Mulone
-- 
View this message in context: http://n2.nabble.com/Cloudmade-transform-tp3734908p3734908.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list