[OpenLayers-Dev] Problem with getting latitude nad
longitude(mapnik layer)
Tom Hughes
tom at compton.nu
Tue Feb 17 16:12:58 EST 2009
sniipe wrote:
> On click event(only on Mapnik layer) I received some data, but it is
> not longitude and latitude. And my question is how to convert it to
> get properly values(lat, lon)?
Yes - project it back from 900913 (spherical mercator) to 4326
(lat/lon). Off the top of y head, something like this should do it:
latlon.transform(map.getProjectionObject(),
new OpenLayers.Projection("EPSG:4326"))
Tom
--
Tom Hughes (tom at compton.nu)
http://www.compton.nu/
More information about the Dev
mailing list