[OpenLayers-Users] WMS Layer Request Problems
Bradley McLain
bradley_mclain at debortoliwines.com
Fri Dec 14 00:23:35 EST 2007
For all those concerned this is the same topic as brought up in
"HostGIS+OpenLayers
WMS requests to mapserver problems".
Sorry for the posts to multiple lists, I have started a new topic in an
attempt to focus it to the most appropriate list.
Original Post:
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
I originally had an FGS setup installed and my OpenLayers page worked fine
displaying both Google Maps layers and Mapserver layers which were retrieved
by a WMS request.
However I have now moved over to HostGIS as a base and the WMS requests have
become really strange.
Originally a standard WMS request statement looked like this:
http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/mswmsrq.map&service=wms&version=1.1.1&request=getmap&SRS=EPSG:4326&layers=grap,grcad,cadbd,propbd,fmbl,varbl
However when running under HostGIS I kept getting mapserv errors and after
satisfying all of the things it was whinging about, I got it to finally
display again using the request shown below:
http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/mswmsrq.map&service=wms&version=1.1.1&request=getmap&SRS=EPSG:4326&layers=grap,grcad,cadbd,propbd,fmbl,varbl&BBOX=144.841,-34.5838,146.344,-34.0477&format=image/png&width=800&height=600&styles=
Notice the really strange "styles="
Despite this I cannot get WMS requests out of OpenLayers to work at all,
even adding all of the extra parameters it is asking for.
I have no idea what's going on here, possibly different mapserver settings
are present in the HostGIS setup.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Anyway to answer some of your questions:
@Christopher
Once again sorry about the multiple posts, anyway on to the subject at hand:
A styles parameter is not optional according to the WMS 1.1 spec, nor is
it optional in MapServer 5.0. (This is probably the single most
"controversial" change in 5.0, and I believe it's going away in 5.0.1.)
So these parameters have always been required? it was just the case that I
was running an older version of mapserver that did not enforce them?
My mapserver version is 5.0.0, it was in my previous build 4.4.1
I don't know what 'work at all' means, you'll need to be more specific.
With "work at all" I was referring to simply trying to add in the additional
parameter in the OpenLayers WMS Layer definition. Since then I have got a
Mapserver Layer working, so I guess this narrows the problem down to a WMS
issue. Currently my WMS definitions in OL are as follows:
var grap = new OpenLayers.Layer.WMS( "Griffith Aerial Photo",
"http://192.168.1.130/cgi-bin/mapserv?map=/var/www/mapfiles/wms.map",
{layers: 'grap', format:"image/png"},
{isBaseLayer: false}
);
@Gregor
I don't see your cross-post to the OpenLayers mailing list. Debugging it
from a OL perspective, I'd ask whether your browser is in fact able to
contact the WMS server to make a WMS request at all -- firewalls and
DMZs are culprits in that regard, as are "localhost" or private IPs. If
it can do that, then you'd want to "tail -f" your webserver's access log
and hit reload on your browser's map, and see whether the browser is
even trying and what it's trying to do.
I really don't think this should be an issue given that I have tested it on
a client and on the server itself and the problem exists on both. Also the
exact same setup, just a different OS worked fine about a week ago, I don't
believe there are any firewalls of DMZ's between them either.
I will however give it some further testing and try check the access log as
seeing HostGIS may have some settings that are blocking or as you said to
see if it is actually requesting what i want.
Cheers
Brad
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20071214/a267e14f/attachment.html
More information about the Users
mailing list