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

Nathan L nathan.tyler.lowry at gmail.com
Thu Jun 3 09:14:43 PDT 2021


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20210603/dac03cb1/attachment-0001.html>


More information about the mapserver-users mailing list