Dear Viola,
it's seams more or less the same problem I have[1]
have you verified if the same WMS service is correctly overlayed to a google or osm layer using the on the fly re-projection in QGis? This could be a test to confirm that the data are ok...

Moreover looking inside your code you are displaying a WMS service declared as EPSG:32737 on a map with a projection parameter set as EPSG:3857... I'm a newbie with openlayers and I was asking me if is it enough to get a reprojection of the WMS map?

cheers

    Manuele

[1] http://sourceforge.net/mailarchive/forum.php?thread_name=4E71BD08.1040004%40bruttocarattere.org&forum_name=geoserver-users <http://sourceforge.net/mailarchive/forum.php?thread_name=4E71BD08.1040004%40bruttocarattere.org&forum_name=geoserver-users>

On 29/08/2011 14:08, Viola Anne wrote:

Hello list,
I am trying to overlay wms on google satellite, I have read a few articles on the same and finally what i have is *ONE*: the WMS layers overlaying vertically but there seems to be a spatial shift horizontally (to the right). *TWO*: the WMS does NOT overlay AT ALL at certain zoom levels, while at other zoom levels works as described in *ONE. */attached a screenshot of the shift/
*
*
i have downloaded proj4js folder and copied into openlayers folder then included the <script type='text/javascript' src="openlayers/proj4js/lib/proj4js-combined.js"></script> just before openlayers.js script. In geoserver i have set the SRS to EPSG:32737 and below is relevant piece of openlayers code and a screenshot of the wms & google overlay



Proj4js.defs["EPSG:32737"] ="+proj=utm +zone=37 +south +ellps=WGS84 +datum=WGS84 +units=m +no_defs ";
Proj4js.defs["EPSG:3857"]=Proj4js.defs["GOOGLE"];
var mapExtent= new OpenLayers.Bounds(170361.569, 9963401.274,183801.419, 9971245.621); mapExtent.transform(new OpenLayers.Projection('EPSG:32737'), new OpenLayers.Projection('EPSG:3857'));

var options = {
              projection: new OpenLayers.Projection("EPSG:3857"),
              displayProjection: new OpenLayers.Projection("EPSG:32737"),
              units: "m",
 //maxResolution: "auto",
              maxResolution: 156543.0339,
              maxExtent: mapExtent ,
     minExtent: "auto",
    restrictedExtent: mapExtent
           };

           map = new OpenLayers.Map('map', options);

var LandParcel= new OpenLayers.Layer.WMS(
"Land Parcels",
"http://localhost:8082/geoserver/wms";,
{layers:"nakinfo:nk_land_parcels",
tiled: true,
format:"image/gif",
transparent:true,
projection: new OpenLayers.Projection("EPSG:32737")},
{visibility: false, opacity:0.3}
);
map.addLayer(LandParcel);


--
Kind Regards,
Viola


_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to