[mapserver-users] wms

rishi rishe28 at gmail.com
Wed Nov 25 22:30:22 PST 2015


hi

i have removed the space and "c://" from the url, still map is not
displaying in the qgis

please check my mapfile whether i am doing any mistake

MAP
  IMAGETYPE      svg
UNITS            METERS
  EXTENT         8240841.450745 2400319.900386 9218007.463612 3107183.406947
  SIZE           1400 1300
  SHAPEPATH      "/ms4w/apps/webgis/data"
  IMAGECOLOR     255 255 255
TRANSPARENT on
DEBUG ON
CONFIG "MS_ERRORFILE" "/ms4w/tmp/ms_error.txt"

web
metadata
  "wms_title"             "MapServer layer"
            "wms_onlineresource"    "
http://localhost:8085/cgi-bin/mapserv.exe?

map=/ms4w/apps/webgis/wmssample.map"
            "wms_enable_request"    "*"
   "wms_srs" "EPSG:4326 EPSG:3857"
  "wms_feature_info_mime_type" "text/html"
end
end

  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
METADATA
            "wms_title"           "districts"
           "wms_srs" "EPSG:4326 EPSG:3857"
        END
    NAME        district_old
    DATA        district_old
    STATUS      Default
    TYPE         POLYGON
PROJECTION
          "init=EPSG:4326"
    END

    CLASS

               style
#color 55 230 51
outlinecolor 90 90 90
width 2
end
LABEL
#color 255 255 255
size 2
BACKGROUNDCOLOR 255 201 14
position auto
END
    END
  END

END

imagetype also i tried with png and svg

url is
http://localhost:8085/cgi-bin/mapserv.exe?map=/ms4w/apps/webgis/wmssample.map&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetCapabilities

On Wed, Nov 25, 2015 at 4:13 AM, John Abraham <jea at hbaspecto.com> wrote:

> 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?
> 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?
> 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/20151126/83aea161/attachment.html>


More information about the mapserver-users mailing list