[OpenLayers-Users] WMS layer is shifted from VE

Eric Lemoine eric.c2c at gmail.com
Thu Sep 27 00:53:06 EDT 2007


On 9/27/07, Leandro R <learonco at gmail.com> wrote:
> Thanks.
> I'm using the reproject flag on a EPSG:4326 wms layer, not in a
> Layer.SpericalMercator or "commercial layers". I want to reproject from
> EPSG:4326 to EPSG:900913.

If you want your wms layer to be reprojected to EPSG:900913 you should
not use projection:'EPSG:4326' in your wms layer options.

> Does OpenLayers use the projection of the map on the GetMap request?...so
> all the layers can lineup correctly.

Yes, unless layers define their own projection option, as you do.

> If the answer is true, would not be the server that makes the reprojection
> and send the "reprojected" image to the client?

No. Actually, the "reprojected" option is not even transferred to the
wms server. It is used internally by OpenLayers.

> The layers and the map should have the same projection?

What people usally do is set a projection at the map level and none at
the layer level.

> I'm starting with this, and as you can see I have a lot of doubts.

You should take a look at the sphercial mercator example.
<http://www.openlayers.org/dev/examples/spherical-mercator.html>

--
Eric



More information about the Users mailing list