<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#ffffff">
Dear Viola,<br>
it's seams more or less the same problem I have[1]<br>
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...<br>
<br>
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?<br>
<br>
cheers<br>
<br>
Manuele<br>
<br>
<a
href="http://sourceforge.net/mailarchive/forum.php?thread_name=4E71BD08.1040004%40bruttocarattere.org&forum_name=geoserver-users">[1]
http://sourceforge.net/mailarchive/forum.php?thread_name=4E71BD08.1040004%40bruttocarattere.org&forum_name=geoserver-users</a><br>
<br>
On 29/08/2011 14:08, Viola Anne wrote:
<blockquote
cite="mid:CAB1bAVurbK=5qs-FZ5fK0BeyJm5x5mhA3oHEAsxk34TPd8HseQ@mail.gmail.com"
type="cite">
<div class="gmail_quote"><br>
Hello list,
<div>I am trying to overlay wms on google satellite, I have read
a few articles on the same and finally what i have is </div>
<div><b>ONE</b>: the WMS layers overlaying vertically but there
seems to be a spatial shift horizontally (to the right).</div>
<div><b>TWO</b>: the WMS does NOT overlay AT ALL at certain zoom
levels, while at other zoom levels works as described in <b>ONE.
</b><i>attached a screenshot of the shift</i></div>
<div><b><br>
</b></div>
<div>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</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>Proj4js.defs["EPSG:32737"] ="+proj=utm +zone=37 +south
+ellps=WGS84 +datum=WGS84 +units=m +no_defs ";</div>
<div>
<div>Proj4js.defs["EPSG:3857"]=Proj4js.defs["GOOGLE"];</div>
<div><span style="white-space: pre-wrap;"> </span></div>
<div>var mapExtent= new OpenLayers.Bounds(170361.569,
9963401.274,183801.419, 9971245.621);</div>
<div>mapExtent.transform(new
OpenLayers.Projection('EPSG:32737'), new
OpenLayers.Projection('EPSG:3857'));</div>
<div><br>
</div>
<div><span style="font-size: x-small; white-space: pre-wrap;">
</span>var options = {</div>
<div> projection: new
OpenLayers.Projection("EPSG:3857"),</div>
<div> displayProjection: new
OpenLayers.Projection("EPSG:32737"),</div>
<div> units: "m",</div>
<div><span style="white-space: pre-wrap;"> </span>
//maxResolution: "auto",</div>
<div> maxResolution: 156543.0339,</div>
<div> maxExtent: mapExtent ,</div>
<div><span style="white-space: pre-wrap;"> </span>
minExtent: "auto",</div>
<div><span style="white-space: pre-wrap;"> </span>
restrictedExtent: mapExtent</div>
<div> };</div>
<div><br>
</div>
<div> map = new OpenLayers.Map('map', options);</div>
</div>
<div><br>
</div>
<div>
<div>var LandParcel= new OpenLayers.Layer.WMS(</div>
<div><span style="white-space: pre-wrap;"> </span>"Land
Parcels",</div>
<div><span style="white-space: pre-wrap;"> </span>"<a
moz-do-not-send="true"
href="http://localhost:8082/geoserver/wms" target="_blank">http://localhost:8082/geoserver/wms</a>",</div>
<div><span style="white-space: pre-wrap;"> </span>{layers:"nakinfo:nk_land_parcels",</div>
<div><span style="white-space: pre-wrap;"> </span>tiled:
true,</div>
<div><span style="white-space: pre-wrap;"> </span>format:"image/gif",</div>
<div><span style="white-space: pre-wrap;"> </span>transparent:true,</div>
<div><span style="white-space: pre-wrap;"> </span>projection:
new OpenLayers.Projection("EPSG:32737")},</div>
<div><span style="white-space: pre-wrap;"> </span>{visibility:
false, opacity:0.3}</div>
<div><span style="white-space: pre-wrap;"> </span>);</div>
<div>map.addLayer(LandParcel); </div>
</div>
<div>
<div><br>
</div>
</div>
</div>
<div><br>
</div>
-- <br>
<div>Kind Regards,</div>
<div>Viola</div>
<br>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a>
</pre>
</blockquote>
<br>
</body>
</html>