[mapserver-users] create wms service with mapserver

Rahkonen Jukka (MML) jukka.rahkonen at maanmittauslaitos.fi
Mon Nov 23 03:32:51 PST 2015


There is nothing that is obviously wrong in your mapfile. Some suggestions:

-          Add debug 5 into your layer

-          Try to get a map with shp2img

-          Convert data from PostGIS into shapefile and use that as source data.


It seems that you have changed something in between because first you wrote “in the browser when i paste the url "http://localhost/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map&SERVICE=WMS&REQUEST=GetCapabilities"

Now you write that this is the URL
(http://localhost:8085/cgi-bin/mapserv.exe?mode=map&map=c://ms4w/apps/webgis/mp/wms.map),



-Jukka Rahkonen-

Lähettäjä: rishi [mailto:rishe28 at gmail.com]
Lähetetty: 23. marraskuuta 2015 13:10
Vastaanottaja: Rahkonen Jukka (MML)
Aihe: Re: [mapserver-users] create wms service with mapserver

When i tried to open that mapserv.exe file it is displaying as "the file or directory is corrupted or unreadable".

if i open the same file as mode=map (http://localhost:8085/cgi-bin/mapserv.exe?mode=map&map=c://ms4w/apps/webgis/mp/wms.map), it is displaying the map

On Mon, Nov 23, 2015 at 4:34 PM, Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>> wrote:
MS4W is ready for WMS but please tell us first what do you see when you opened the mapserv.exe file with a text editor.

-Jukka Rahkonen-

rishi wrote:

do i need to install anything related to wms in ms4w folder?

MapServer version 5.2.1

On Mon, Nov 23, 2015 at 3:52 PM, Rahkonen Jukka (MML) <jukka.rahkonen at maanmittauslaitos.fi<mailto:jukka.rahkonen at maanmittauslaitos.fi>> wrote:
I guess that something went wrong but saving mapserv.exe into file and reading it with text editor is the right thing to do. Jörg and Jeff should have noticed that the GetCapabilities request was made without &VERSION which means the highest version 1.3.0 for Mapserver and then the normal GetCapabilities document will be sent with mime type that most browsers understand. Try it:
http://demo.mapserver.org/cgi-bin/wms?SERVICE=WMS&REQUEST=GetCapabilities

I may be wrong but I would rather believe that mapserv.exe contains an error message about unknown projection epsg:900913. Use epsg:3857 instead.  And I prefer using an explicit parameter &VERSION= always instead of relying on what version comes from the lottery when version in not defined in the query.

-Jukka Rahkonen-




Jörg Thomsen wrote:

Hi,

nothing went wrong. The problem under windows is, that apache(?) names the capabilities-document mapserv.exe. Save it, open it in an editor and see your capabilities!

Perhaps anyone reading this can tell us how to configure the windows-instrallation, so that the capabilities-doc is not named .exe? I don't know.

Jörg



Am 23.11.2015 um 10:30 schrieb rishi:

i am trying to create wms service using postgres data in mapserver my map file(wms.map) is

MAP EXTENT 8240841.450745 2400319.900386 9218007.463612 3107183.406947 TRANSPARENT on IMAGETYPE png size 150 500

web

    metadata

"wms_title" "Customer Airports" "wms_onlineresource" "http://localhost:8085/cgi-bin/mapserv.exe?" "wms_enable_request" "*" "wms_srs" "EPSG:4326 EPSG:900913" "wms_feature_info_mime_type" "text/html" "wms_format" "image/png"

    end

end

LAYER CONNECTIONTYPE postgis
CONNECTION "user=postgres password=abcd dbname=sample port=5432 host=localhost" DATA "geom FROM district_old using unique gid"

STATUS Default

TYPE polygon





PROJECTION

      "init=epsg:900913"

END







labelitem 'district'



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

in the browser when i paste the url "http://localhost/cgi-bin/mapserv.exe?map=c://ms4w/apps/webgis/wms.map&SERVICE=WMS&REQUEST=GetCapabilities"

it is not displaying the xml file instead it is downloading the mapserv.exe file

please correct my code also tell me the requirements to work with wms


_______________________________________________

mapserver-users mailing list

mapserver-users at lists.osgeo.org<mailto:mapserver-users at lists.osgeo.org>

http://lists.osgeo.org/mailman/listinfo/mapserver-users


_______________________________________________
mapserver-users mailing list
mapserver-users at lists.osgeo.org<mailto: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/20151123/9bb662cb/attachment.htm>


More information about the MapServer-users mailing list