[OpenLayers-Users] RE: Users Digest, Vol 68, Issue 51
Gery .
gamejihou at hotmail.com
Fri May 25 11:35:56 PDT 2012
Glad to hear that it worked Derek! you're welcome dude, so enjoy it!
Have a nice weekend, cheers,
Gery
> Date: Fri, 25 May 2012 13:30:26 -0400
> From: jdmorgan at unca.edu
> To: openlayers-users at lists.osgeo.org; gamejihou at hotmail.com
> Subject: Re: Users Digest, Vol 68, Issue 51
>
> Thanks again Gery,
>
> You definitly pointed me in the right direction. I am using MapServer
> and It was as you suggested necessary for me to add it to the .map in
> the wms_srs section. Once I did that it worked like a champ.
>
> Cheers,
> Derek
>
> On 5/24/2012 5:25 PM, openlayers-users-request at lists.osgeo.org wrote:
> > Send Users mailing list submissions to
> > openlayers-users at lists.osgeo.org
> >
> > To subscribe or unsubscribe via the World Wide Web, visit
> > http://lists.osgeo.org/mailman/listinfo/openlayers-users
> > or, via email, send a message with subject or body 'help' to
> > openlayers-users-request at lists.osgeo.org
> >
> > You can reach the person managing the list at
> > openlayers-users-owner at lists.osgeo.org
> >
> > When replying, please edit your Subject line so it is more specific
> > than "Re: Contents of Users digest..."
> >
> >
> > Today's Topics:
> >
> > 1. RE: wms layer over openstreet base map (Gery .)
> > 2. RE: wms layer over openstreet base map (Gery .)
> >
> >
> > ----------------------------------------------------------------------
> >
> > Message: 1
> > Date: Thu, 24 May 2012 21:23:07 +0000
> > From: "Gery ."<gamejihou at hotmail.com>
> > Subject: RE: [OpenLayers-Users] wms layer over openstreet base map
> > To:<jdmorgan at unca.edu>
> > Cc: openlayers-users at lists.osgeo.org
> > Message-ID:<DUB111-W128D103937DD58D1195BE74B0000 at phx.gbl>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> >
> >
> > Hola Derek,
> >
> > 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).
> >
> > Hope this helps!, cheers
> >
> > Date: Thu, 24 May 2012 17:12:27 -0400
> > From: jdmorgan at unca.edu
> > To: gamejihou at hotmail.com
> > CC: openlayers-users at lists.osgeo.org
> > Subject: Re: [OpenLayers-Users] wms layer over openstreet base map
> >
> >
> >
> >
> >
> >
> > Hola Gery,
> >
> >
> >
> > 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
> >
> >
> >
> > 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:
> >
> >
> >
> > <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> >
> > <!DOCTYPE ServiceExceptionReport SYSTEM
> > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
> >
> > <ServiceExceptionReport version="1.1.1">
> >
> > <ServiceException code="InvalidSRS">
> >
> > msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS
> > must be valid for all requested layers.
> >
> > </ServiceException>
> >
> > </ServiceExceptionReport>
> >
> >
> >
> >
> >
> > Thanks,
> >
> > Derek
> >
> >
> >
> >
> >
> >
> >
> > On 5/24/2012 1:46 PM, Gery . wrote:
> >
> >
> >
> >
> >
> > Hello,
> >
> >
> >
> > I think you're right, projection has something to do there, this
> > link may help you:
> > http://blog.sonxurxo.com/2011/04/28/tutorial-de-openlayers-ii-capas-de-google/
> >
> >
> >
> > There is a lot of stuff about google maps and openlayers and
> > projection, just google them.
> >
> >
> >
> > Hope this helps,
> >
> >
> >
> >
> >
> >
> >
> > > Date: Thu, 24 May 2012 13:37:52 -0400
> >
> > > From: jdmorgan at unca.edu
> >
> > > To: openlayers-users at lists.osgeo.org
> >
> > > Subject: [OpenLayers-Users] wms layer over openstreet
> > base map
> >
> > >
> >
> > > Hello,
> >
> > > I am trying to get a wms states layer to overlay on a
> > base openstreet
> >
> > > map. The openstreet map shows up fine but the wms layer
> > never does. I
> >
> > > am guessing this is a projection issue but can't figure
> > out how to
> >
> > > resolve it. Any tips would be greatly appreciated. Here
> > is my code:
> >
> > >
> >
> > > <!DOCTYPE HTML>
> >
> > > <html>
> >
> > > <head>
> >
> > > <title>OpenLayers Demo</title>
> >
> > > <style type="text/css">
> >
> > > html, body, #basicMap {
> >
> > > width: 100%;
> >
> > > height: 100%;
> >
> > > margin: 0;
> >
> > > }
> >
> > > </style>
> >
> > > <script
> > src="http://www.openlayers.org/api/OpenLayers.js"></script>
> >
> > > <script>
> >
> > > function init() {
> >
> > >
> >
> > > map = new OpenLayers.Map("basicMap", {projection:
> > "EPSG:900913"});
> >
> > > var mapnik = new OpenLayers.Layer.OSM();
> >
> > > var fromProjection = new
> > OpenLayers.Projection("EPSG:4326");
> >
> > > // Transform from WGS 1984
> >
> > > var toProjection = new
> > OpenLayers.Projection("EPSG:900913");
> >
> > > // to Spherical Mercator Projection
> >
> > > var position = new OpenLayers.LonLat(-98.0859375,
> >
> > > 39.095962936305476).transform(fromProjection,
> > toProjection);
> >
> > > var zoom = 5;
> >
> > >
> >
> > > var stateMap = new OpenLayers.Layer.WMS(
> >
> > > 'States',
> >
> > > 'http://pathToWMSlayer/vlayers',
> >
> > > {layers: 'states', transparent: true}
> >
> > > {
> >
> > > isBaseLayer: false,
> >
> > > }
> >
> > > );
> >
> > >
> >
> > > map.addLayers([mapnik, stateMap]);
> >
> > > map.setCenter(position, zoom);
> >
> > > }
> >
> > > </script>
> >
> > > </head>
> >
> > > <body onload="init();">
> >
> > > <div id="basicMap"></div>
> >
> > > </body>
> >
> > > </html>
> >
> > >
> >
> > >
> >
> > > Thanks ahead of time,
> >
> > > Derek
> >
> > > _______________________________________________
> >
> > > Users mailing list
> >
> > > Users at lists.osgeo.org
> >
> > > http://lists.osgeo.org/mailman/listinfo/openlayers-users
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Derek @ NEMAC
> > http://nemac.unca.edu
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120524/b6ea2c84/attachment-0001.html
> >
> > ------------------------------
> >
> > Message: 2
> > Date: Thu, 24 May 2012 21:24:49 +0000
> > From: "Gery ."<gamejihou at hotmail.com>
> > Subject: RE: [OpenLayers-Users] wms layer over openstreet base map
> > To:<jdmorgan at unca.edu>
> > Cc: openlayers-users at lists.osgeo.org
> > Message-ID:<DUB111-W18BF30B5956DE2B80645B2B0000 at phx.gbl>
> > Content-Type: text/plain; charset="iso-8859-1"
> >
> >
> >
> > sorry!, I meant "4326" instead of "4322" =)
> >
> > From: gamejihou at hotmail.com
> > To: jdmorgan at unca.edu
> > Subject: RE: [OpenLayers-Users] wms layer over openstreet base map
> > Date: Thu, 24 May 2012 21:23:07 +0000
> > CC: openlayers-users at lists.osgeo.org
> >
> >
> >
> >
> >
> >
> > Hola Derek,
> >
> > 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).
> >
> > Hope this helps!, cheers
> >
> > Date: Thu, 24 May 2012 17:12:27 -0400
> > From: jdmorgan at unca.edu
> > To: gamejihou at hotmail.com
> > CC: openlayers-users at lists.osgeo.org
> > Subject: Re: [OpenLayers-Users] wms layer over openstreet base map
> >
> >
> >
> >
> >
> >
> > Hola Gery,
> >
> >
> >
> > 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
> >
> >
> >
> > 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:
> >
> >
> >
> > <?xml version='1.0' encoding="ISO-8859-1" standalone="no" ?>
> >
> > <!DOCTYPE ServiceExceptionReport SYSTEM
> > "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd">
> >
> > <ServiceExceptionReport version="1.1.1">
> >
> > <ServiceException code="InvalidSRS">
> >
> > msWMSLoadGetMapParams(): WMS server error. Invalid SRS given : SRS
> > must be valid for all requested layers.
> >
> > </ServiceException>
> >
> > </ServiceExceptionReport>
> >
> >
> >
> >
> >
> > Thanks,
> >
> > Derek
> >
> >
> >
> >
> >
> >
> >
> > On 5/24/2012 1:46 PM, Gery . wrote:
> >
> >
> >
> >
> >
> > Hello,
> >
> >
> >
> > I think you're right, projection has something to do there, this
> > link may help you:
> > http://blog.sonxurxo.com/2011/04/28/tutorial-de-openlayers-ii-capas-de-google/
> >
> >
> >
> > There is a lot of stuff about google maps and openlayers and
> > projection, just google them.
> >
> >
> >
> > Hope this helps,
> >
> >
> >
> >
> >
> >
> >
> > > Date: Thu, 24 May 2012 13:37:52 -0400
> >
> > > From: jdmorgan at unca.edu
> >
> > > To: openlayers-users at lists.osgeo.org
> >
> > > Subject: [OpenLayers-Users] wms layer over openstreet
> > base map
> >
> > >
> >
> > > Hello,
> >
> > > I am trying to get a wms states layer to overlay on a
> > base openstreet
> >
> > > map. The openstreet map shows up fine but the wms layer
> > never does. I
> >
> > > am guessing this is a projection issue but can't figure
> > out how to
> >
> > > resolve it. Any tips would be greatly appreciated. Here
> > is my code:
> >
> > >
> >
> > > <!DOCTYPE HTML>
> >
> > > <html>
> >
> > > <head>
> >
> > > <title>OpenLayers Demo</title>
> >
> > > <style type="text/css">
> >
> > > html, body, #basicMap {
> >
> > > width: 100%;
> >
> > > height: 100%;
> >
> > > margin: 0;
> >
> > > }
> >
> > > </style>
> >
> > > <script
> > src="http://www.openlayers.org/api/OpenLayers.js"></script>
> >
> > > <script>
> >
> > > function init() {
> >
> > >
> >
> > > map = new OpenLayers.Map("basicMap", {projection:
> > "EPSG:900913"});
> >
> > > var mapnik = new OpenLayers.Layer.OSM();
> >
> > > var fromProjection = new
> > OpenLayers.Projection("EPSG:4326");
> >
> > > // Transform from WGS 1984
> >
> > > var toProjection = new
> > OpenLayers.Projection("EPSG:900913");
> >
> > > // to Spherical Mercator Projection
> >
> > > var position = new OpenLayers.LonLat(-98.0859375,
> >
> > > 39.095962936305476).transform(fromProjection,
> > toProjection);
> >
> > > var zoom = 5;
> >
> > >
> >
> > > var stateMap = new OpenLayers.Layer.WMS(
> >
> > > 'States',
> >
> > > 'http://pathToWMSlayer/vlayers',
> >
> > > {layers: 'states', transparent: true}
> >
> > > {
> >
> > > isBaseLayer: false,
> >
> > > }
> >
> > > );
> >
> > >
> >
> > > map.addLayers([mapnik, stateMap]);
> >
> > > map.setCenter(position, zoom);
> >
> > > }
> >
> > > </script>
> >
> > > </head>
> >
> > > <body onload="init();">
> >
> > > <div id="basicMap"></div>
> >
> > > </body>
> >
> > > </html>
> >
> > >
> >
> > >
> >
> > > Thanks ahead of time,
> >
> > > Derek
> >
> > > _______________________________________________
> >
> > > Users mailing list
> >
> > > Users at lists.osgeo.org
> >
> > > http://lists.osgeo.org/mailman/listinfo/openlayers-users
> >
> >
> >
> >
> >
> >
> >
> >
> > --
> > Derek @ NEMAC
> > http://nemac.unca.edu
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/openlayers-users
> > -------------- next part --------------
> > An HTML attachment was scrubbed...
> > URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120524/5eaaf41b/attachment.html
> >
> > ------------------------------
> >
> > _______________________________________________
> > Users mailing list
> > Users at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/openlayers-users
> >
> >
> > End of Users Digest, Vol 68, Issue 51
> > *************************************
>
>
> --
> Derek @ NEMAC
> http://nemac.unca.edu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120525/a832e523/attachment-0001.html
More information about the Users
mailing list