[OpenLayers-Users] Vector layer on top of SphericalMercator
layer
Christopher Schmidt
crschmidt at metacarta.com
Wed May 7 10:50:13 EDT 2008
On Wed, May 07, 2008 at 04:27:06PM +0200, jrom wrote:
> I've tried this as you can see on the attached file.
> In this case, the point appears on the map...but it is always on
> lat=0/lon=0 nevermind the value of the WKT coordinates :(
No, it ends up at x=-71, y=42: that's just very close to 0,0.
The Vector layer does not reproject coordinates. If you are parsing data
with a format class, you need to reproject there: specifically, you
should create your format class like:
wkt = new OpenLayers.Format.WKT({
internalProjection: map.getProjectionObject(),
externalProjection: map.displayProjection});
Regards,
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list