[mapserver-users] wms

John Abraham jea at hbaspecto.com
Tue Nov 24 14:43:57 PST 2015


You are not normally supposed to include the other parameters (&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities) when you are adding a WMS/WFS URL to QGIS.  You specify the service and version in the QGIS dialog box instead.  QGIS will append those parameters for you, and query the GetCapabilities for you, and provide you with a list of options.  After you select a layer to include, QGIS will query without the GetCapabilities to retrieve the actual map images, based on what it finds when it did the GetCapabilities query.

So, try http://localhost:8085/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wmssample.map

(In fact when you are working with other GIS packages it is sometimes even a problem to include the ?map=  parameter explicitly in the URL.  There's some approach with Apache Rewrite rules or mapserver configuration files or something like that to tell mapserver the name of the mapfile without having it as a parameter in the URL.  I can't find the documentation on that right now, but I didn't look too hard.  It seems the normal use case is to have a public facing URL and then your different feature layers are all defined in the same mapfile that's hidden from the user.  Anyway, my use case has hundreds of dynamically generated mapfiles, and QGIS never seems to have a problem with having the ?map= in the URL.)

As the other person mentioned, try to avoid putting the drive letter "c://" in the URL. It's just confusing to everyone to have a drive letter in the middle of a url.

Also, in your email below I see a space before the word map.  Make sure that's not there in reality.  " map" might not be recognized as the same parameter name as "map" 

--
John Abraham
jea at hbaspecto.com
403-232-1060

> On Nov 24, 2015, at 12:24 AM, rishi <rishe28 at gmail.com> wrote:
> 
> hi all
> 
> my wms url is
>  http://localhost:8085/cgi-bin/mapserv.exe <http://localhost:8085/cgi-bin/mapserv.exe>? map=c://ms4w/apps/webgis/wmssample.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
> 
> when i hit the above url it is downloading the mapserv.exe then i am changing .exe to .txt then i can able to see xml file
> 
> but when i am trying to add the above url in qgis, map is not displaying also i am getting error as document is in invalid format.
> 
> if i hit the url  http://localhost:8085/cgi-bin/mapserv <http://localhost:8085/cgi-bin/mapserv>? map=c://ms4w/apps/webgis/wmssample.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities
>  
> without .exe the it is showing error as The requested URL /cgi-bin/mapserv was not found on this server.
> 
> please tell me how to resolve the issue
>  
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20151124/8950219f/attachment.html>


More information about the mapserver-users mailing list