[OpenLayers-Users] WMS layer is shifted from VE
Christopher Schmidt
crschmidt at metacarta.com
Wed Sep 26 18:12:00 EDT 2007
On Wed, Sep 26, 2007 at 05:59:29PM -0300, Leandro R wrote:
> Hello!!!
>
> I'm having some problem with GoogleMaps+VE and a WMS layer: the wms layer is
> shifted from the correct position.
> I set the EPSG:900913 to the map, this is the projection that gmaps and ve
> uses, so it is OK with these layer; but the WMS layer is EPSG:4326, so I set
> {reproject:true} on the layer and other projection properties (see attach),
> but nothing gets better. I've tried retyping 'reproject', "reproject" but
> nothing changes.
> Wich is the correct syntax? and first of all: what am I doing wrong?
You can't combine EPSG:900913 with EPSG:4326 layers. There is no support
for client side reprojection. The 'reproject': true flag is designed to
be used with the non-Sperical Mercator Layer types.
You'll need to figure out a way to get your WMS data in spherical
mercator if you want to overlay cleanly on Google.
-- Chris
> This is the wms layer:
> var celocal = new OpenLayers.Layer.WMS(
> "Concesion de Explotacion",
> "http://localhost:8080/geoserver/wms?SERVICE=WMS&",
> {layers: "topp:ce", transparent:true, format:"image/png"},
> {visibility:false},{reproject:true},
> {projection:"EPSG:4326", maxResolutions:"auto", units:"degrees",
> maxExtent: new OpenLayers.Bounds(-71.22730000364072,-54.108713712351516
> ,-61.704863812735645,-21.997980638983385)}
> );
>
> This is the map:
> var map = new OpenLayers.Map( 'map', {
> controls:[],
> projection: "EPSG:900913", units: "m", maxResolution: 156543.0339,
> maxExtent: new OpenLayers.Bounds(-20037508, -20037508,20037508,
> 20037508.34)}
> );
>
> Please see the attached image.
> Keep in mind that i'm starting with OL and JavaScript.
>
> Thanks.
>
> OL 2.5-rc3
> GeoServer 1.5.3
> Apache Tomcat 5.5.23
> Firefox 2.0.0.7
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
--
Christopher Schmidt
MetaCarta
More information about the Users
mailing list