[mapserver-users] SUM: MapServer PostGIS: WMS Layers Without Features

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Thu Jun 3 09:24:11 PDT 2021


Hi,

All Mapserver admins do that error every now and then.

There is a configuration option in the QGIS WMS Connection editor “Ignore GetMap/GetTile/GetLegendGraphic URI reported in capabilities” that helps to access many misconfigured WMS servers. If you check that box the same base URL that is used for GetCapabilities is used also for other requests. Other clients may have similar configuration option, at least OpenJUMP does.

-Jukka Rahkonen-

Lähettäjä: mapserver-users <mapserver-users-bounces at lists.osgeo.org> Puolesta Nathan L via mapserver-users
Lähetetty: torstai 3. kesäkuuta 2021 19.15
Vastaanottaja: mapserver-users at lists.osgeo.org
Aihe: [mapserver-users] SUM: MapServer PostGIS: WMS Layers Without Features

Earlier, I asked why my MapServer PostGIS implementation was producing a WMS service without any layers in it. The original question in detail is at the bottom of this summary.

The responses here and in other forums were quite helpful. It narrowed down the problem to about ten areas, which I dutifully examined as a checklist. Richard Greenwood's earliest suggestions happened to be the most helpful. He suggested to look at the Apache logs to see what requests QGIS or ArcGIS was sending to MapServer. I'm glad I did - they kept redirecting in the URL to a "wms.map" file at the root directory that didn't exist.

I then looked at my mapfile and lo and behold, I was the one redirecting it! I had taken example code from the Setup a Mapfile For Your WMS<https://mapserver.org/ogc/wms_server.html#setup-a-mapfile-for-your-wms> documentation and hadn't customized it to my implementation. The example code wasn't annotated so I didn't realize it included an example that required revision.

It was in the WMS Metadata of the mapfile, where:
"wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=wms.map&?"

I changed it to point to the actual mapfile location:
"wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?map=%2Fms4w%2Fapps%2Fsegis-demo%2Fmap-segis-demo.map&?"

Ironic as it was a line in the mapfile that redirected the run of the program away from itself. I'm so very grateful for the responses I received to help me solve my (self-inflicted, as many are...) problem.

Nathan Tyler Lowry
Comprehensive GIS Solutions
(719) 208-7092 Desk
(719) 963-3571 Cell
(719) 960-2084 Fax
Nathan.Tyler.Lowry at gmail.com<mailto:Nathan.Tyler.Lowry at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210603/ed9f201f/attachment.htm>


More information about the MapServer-users mailing list