<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<br>sorry!, I meant "4326" instead of "4322" =)<br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">From: gamejihou@hotmail.com<br>To: jdmorgan@unca.edu<br>Subject: RE: [OpenLayers-Users] wms layer over openstreet base map<br>Date: Thu, 24 May 2012 21:23:07 +0000<br>CC: openlayers-users@lists.osgeo.org<br><br>
<style><!--
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
--></style>
<div dir="ltr">
<br>Hola Derek,<br><br>That's great!, your error points to the projection (SRS) that it is required and also something called version 1.1.1 that it is normally added in the MAP file when using Mapserver. Are you using Mapserver? if so, you should read this one: http://mapserver.org/ogc/wfs_server.html, these instructions are useful for WFS layers, but WMS is a bit more problematic, try this one also: http://mapserver.org/ogc/wms_server.html. I think with both of them you will start understanding where the problem is, that it is basically adding the "wms_srs" flag (if using Mapserver) and adding the right projections. If your raster is in UTM, you have to play a bit, probably assigning the right UTM SRID (check for getting ideas: http://stackoverflow.com/questions/1541202/how-do-you-know-what-srid-to-use-for-a-shp-file) plus the 4322 as you already did (or as it appears in the WMS web I put above).<br><br>Hope this helps!, cheers<br><br><div><div id="ecxSkyDrivePlaceholder"></div><hr id="ecxstopSpelling">Date: Thu, 24 May 2012 17:12:27 -0400<br>From: jdmorgan@unca.edu<br>To: gamejihou@hotmail.com<br>CC: openlayers-users@lists.osgeo.org<br>Subject: Re: [OpenLayers-Users] wms layer over openstreet base map<br><br>
Hola Gery, <br>
<br>
That does help and I have been able to narrow the problem down a bit
more. I think this has to do w/ the fact that I am attempting to
load a wms layer and there isn't an entry for the item in epsg
file. I gathered this from the following page<br>
<br>
I have now added the epsg for 900913 but I am still having an
issue. I was able to get an error back from the wms server which
is:<br>
<br>
<?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?><br>
<!DOCTYPE ServiceExceptionReport SYSTEM
<a class="ecxmoz-txt-link-rfc2396E" href="http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd" target="_blank">"http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"</a>><br>
<ServiceExceptionReport version="1.1.1"><br>
<ServiceException code="InvalidSRS"><br>
msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS
must be valid for all requested layers.<br>
</ServiceException><br>
</ServiceExceptionReport><br>
<br>
<br>
Thanks, <br>
Derek<br>
<br>
<br>
<br>
On 5/24/2012 1:46 PM, Gery . wrote:
<blockquote cite="mid:DUB111-W1101D550F02DA0360275A18B0000@phx.gbl">
<style><!--
.ExternalClass .ecxhmmessage P
{padding:0px;}
.ExternalClass body.ecxhmmessage
{font-size:10pt;font-family:Tahoma;}
--></style>
<div dir="ltr">
<br>
Hello,<br>
<br>
I think you're right, projection has something to do there, this
link may help you:
<a class="ecxmoz-txt-link-freetext" href="http://blog.sonxurxo.com/2011/04/28/tutorial-de-openlayers-ii-capas-de-google/" target="_blank">http://blog.sonxurxo.com/2011/04/28/tutorial-de-openlayers-ii-capas-de-google/</a><br>
<br>
There is a lot of stuff about google maps and openlayers and
projection, just google them.<br>
<br>
Hope this helps,<br>
<br>
<br>
<br>
<div>> Date: Thu, 24 May 2012 13:37:52 -0400<br>
> From: <a class="ecxmoz-txt-link-abbreviated" href="mailto:jdmorgan@unca.edu">jdmorgan@unca.edu</a><br>
> To: <a class="ecxmoz-txt-link-abbreviated" href="mailto:openlayers-users@lists.osgeo.org">openlayers-users@lists.osgeo.org</a><br>
> Subject: [OpenLayers-Users] wms layer over openstreet
base map<br>
> <br>
> Hello,<br>
> I am trying to get a wms states layer to overlay on a
base openstreet <br>
> map. The openstreet map shows up fine but the wms layer
never does. I <br>
> am guessing this is a projection issue but can't figure
out how to <br>
> resolve it. Any tips would be greatly appreciated. Here
is my code:<br>
> <br>
> <!DOCTYPE HTML><br>
> <html><br>
> <head><br>
> <title>OpenLayers Demo</title><br>
> <style type="text/css"><br>
> html, body, #basicMap {<br>
> width: 100%;<br>
> height: 100%;<br>
> margin: 0;<br>
> }<br>
> </style><br>
> <script
src=<a class="ecxmoz-txt-link-rfc2396E" href="http://www.openlayers.org/api/OpenLayers.js" target="_blank">"http://www.openlayers.org/api/OpenLayers.js"</a>></script><br>
> <script><br>
> function init() {<br>
> <br>
> map = new OpenLayers.Map("basicMap", {projection:
"EPSG:900913"});<br>
> var mapnik = new OpenLayers.Layer.OSM();<br>
> var fromProjection = new
OpenLayers.Projection("EPSG:4326"); <br>
> // Transform from WGS 1984<br>
> var toProjection = new
OpenLayers.Projection("EPSG:900913"); <br>
> // to Spherical Mercator Projection<br>
> var position = new OpenLayers.LonLat(-98.0859375, <br>
> 39.095962936305476).transform(fromProjection,
toProjection);<br>
> var zoom = 5;<br>
> <br>
> var stateMap = new OpenLayers.Layer.WMS(<br>
> 'States',<br>
> '<a class="ecxmoz-txt-link-freetext" href="http://pathToWMSlayer/vlayers" target="_blank">http://pathToWMSlayer/vlayers</a>',<br>
> {layers: 'states', transparent: true}<br>
> {<br>
> isBaseLayer: false,<br>
> }<br>
> );<br>
> <br>
> map.addLayers([mapnik, stateMap]);<br>
> map.setCenter(position, zoom);<br>
> }<br>
> </script><br>
> </head><br>
> <body onload="init();"><br>
> <div id="basicMap"></div><br>
> </body><br>
> </html><br>
> <br>
> <br>
> Thanks ahead of time,<br>
> Derek<br>
> _______________________________________________<br>
> Users mailing list<br>
> <a class="ecxmoz-txt-link-abbreviated" href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
> <a class="ecxmoz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
</div>
</div>
</blockquote>
<br>
<br>
<pre class="ecxmoz-signature">--
Derek @ NEMAC
<a class="ecxmoz-txt-link-freetext" href="http://nemac.unca.edu" target="_blank">http://nemac.unca.edu</a></pre></div>                                            </div>
<br>_______________________________________________
Users mailing list
Users@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/openlayers-users</div>                                            </div></body>
</html>