[OpenLayers-Users] SpericalMercator
Christopher Schmidt
crschmidt at metacarta.com
Tue Apr 1 21:21:41 EDT 2008
On Wed, Apr 02, 2008 at 12:08:50PM +1100, bradleyspencer wrote:
> I am using a geocoder to go to an address but it always returns to me lat
> longs which is normally just fine. However, I am also using a
> shericalMercator base and would therefore like to transform the single point
> from Lat Longs to Eastings Northings in sphericalMercator projection. Dose
> anyone have a method or the formula to do this?
Are you using 2.6 yet? It's in there: just:
lonlat.transform(new OpenLayers.Projection("EPSG:4326"), new
OpenLayers.Projection("EPSG:900913"));
If not, of course, you can use the forwardMercator and inverseMercator
functions on your commercial sphericalMercator layer. (See
Layer/SphericalMercator.js.)
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list