[OpenLayers-Users] Vector layer on top of SphericalMercator layer

jrom jerome.gasperi at gmail.com
Wed May 7 10:53:27 EDT 2008


Great it works !
Thank you very much for your help !

Regards

On Wed, May 7, 2008 at 4:50 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> 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
>



-- 
jrom.
http://www.ombresetlumieres.com



More information about the Users mailing list