[OpenLayers-Users] Congrats and query? Using spherical Mercator -- can I get at the WGS84 geographic values?

Christopher Schmidt crschmidt at metacarta.com
Sat Sep 15 20:14:05 EDT 2007


On Sat, Sep 15, 2007 at 06:59:11PM -0500, Lance Dyas wrote:
> Most of the geocoding services and search facilities on the web are in  
> bad old EPSG:4326
> I am using Spherical Mercator version of Google Maps layer (in part 
> because it is just more
> correct ) but would like to get at the coords in geographic projection...

http://dev.openlayers.org/docs/files/OpenLayers/Layer/SphericalMercator-js.html#OpenLayers.Layer.SphericalMercator.forwardMercator
http://dev.openlayers.org/docs/files/OpenLayers/Layer/SphericalMercator-js.html#OpenLayers.Layer.SphericalMercator.inverseMercator

Note that these are *not* API methods at the moment -- in the future, I
expect OpenLayers will have reprojection code in it or alongside it that
we encourage people to use, but at the moment, these functions will do
what you need to take in lon/lat and convert to spherical mercator or
the other direction.  

Regards,
-- 
Christopher Schmidt
MetaCarta



More information about the Users mailing list