[ms4w-users] using ms4w as a WMS server
Jeff McKenna
jmckenna at gatewaygeomatics.com
Fri Jun 26 15:29:00 EST 2009
Mark Volz wrote:
> Hello,
>
>
>
> I am using MS4W 2.3.1 with the Mapserver 5.2.2 upgrade and Geomoose as a
> client. I would like to know how to set up a WMS server. I started to
> follow the instructions in the mapserver documentations however I how to
> format the “wms_onlineresource” correctly.
>
>
>
> The mapfile is located at c:\ms4w\apps\geomoose2\maps\data\transit\roads.map
>
>
>
> 1) Would my online resource be:
>
>
>
> "wms_onlineresource"
> "http://localhost/cgi-bin/mapserv?map=c:\ms4w\apps\geomoose2\maps\data\transit\roads.map&"
>
>
>
> 2) would I supply the same connection string to my clients?
>
>
>
> http://localhost/cgi-bin/mapserv?map=c:\ms4w\apps\geomoose2\maps\data\transit\roads.map&
>
>
>
> p.s. yes I do realize that I am using localhost. I will change that to
> my actual server once I get things running.
>
>
>
>
>
> ****************************
>
> MAP FILE:
>
>
>
> NAME 'RoadsWMS'
>
> projection
>
> "init=epsg:26915"
>
> end
>
> WEB
>
> ...
>
> METADATA
>
> "wms_title" "WMS Demo Server"
>
> "wms_onlineresource" "
> http://localhost/cgi-bin/mapserv?map=c:\ms4w\apps\geomoose2\maps\data\transit\roads.map&
> <http://localhost/cgi-bin/mapserv?map=c:\ms4w\apps\geomoose2\maps\data\transit\roads.map&>”
>
> "wms_srs" "EPSG:26915"
>
> END
>
> END
>
> …..
>
> LAYER
>
> NAME "Roads"
>
> projection
>
> "init=epsg:26915"
>
> end
>
> metadata
>
> "wms_title" "roads"
>
> end #metadata
>
> …
>
Hello Mark,
Here are my quick thoughts:
- a great way to see how to setup a WMS server with MS4W is to install
the MS4W add-on package named "PHP/MapScript Sample Application"
- after install, restart apache and check the bottom of the localhost
page for working WMS URLs to your local machine
- follow the setup of that application's mapfiles (in
/ms4w/gmap/htdocs) for configuring a WMS server
- other notes:
- for your CGI requests make sure to call mapserver as "mapserv.exe?"
not "mapserv?" since you are on Windows
- if you want to remove the &MAP= parameter in your
onlineresourceURL, see the section titled "More About the Online
Resource URL" in http://www.mapserver.org/ogc/wms_server.html (the
Apache method applies here)
Have fun!
-jeff
--
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/
More information about the ms4w-users
mailing list