[OpenLayers-Users] Vector layer on top of SphericalMercator
layer
jrom
jerome.gasperi at gmail.com
Wed May 7 10:27:06 EDT 2008
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 :(
On Wed, May 7, 2008 at 4:12 PM, Christopher Schmidt
<crschmidt at metacarta.com> wrote:
> On Wed, May 07, 2008 at 04:08:40PM +0200, jrom wrote:
> > Hi,
> >
> > I am trying to reproject lat/lon vector ontop of commercial api using
> > OpenLayers.
> > I've spent quite a lot of time on a strange behaviour. My vector does
> > not appear on the map when i switch on sphericalMercator to true...
> >
> > The problem is that the point does not appear at all on the map.
> > However, when i switch sphericalMercator to false, it appears (but not
> > on the right place at large scale due to projection difference)
> >
> > I really don't understand what i am doing wrong. I've check the
> > projected coordinates and they are correct...
> >
> > Did someone experience such an issue ?
>
> The layer is being turned off because it is 'out of range'. The reason
> for this is that you have not defined the spherical mercator projection
> propertpies on the map: this means that the overlay is pulling the
> defaults from the map (which are in lon/lat) and therefore has a
> resolutions range of 1.40625 -> some very small number, while your
> spherical mercator layer has a range of 150000ish -> 100ish, and the end
> result is that your layer is never on.
>
> Copy the options from the map creation in the spherical-mercator.html
> example, and add them to your map constructor, and your layer should
> appear.
>
> -- Chris
--
jrom.
http://www.ombresetlumieres.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080507/0b48afcd/sphericalMercator.html
More information about the Users
mailing list