Saturday, January 16, 2010

Installing Mapserver -Windows

We just need to setup MapServer to run on a local machine for now and the best way to do that is to use MapServer for Windows (MS4W). This package is a all-in-one web mapping environment. It comes complete with Apache Web Server, PHP, MapServer, and other open source GIS utilities. Here’s how to set it up and add a “Google Maps”-like interface (using ka-Map) in under 10 minutes . I won’t describe the details of how everything interacts because you don’t really have to know right now. It just works.

  1. Download the MS4W PHP5 Base Installer v2.2.6 (Sept 18,2007) from here.
  2. Unzip the file to the root of your C:\ drive and this will create a folder C:\ms4w.
  3. For some initial data, download the PHP/MapScript Sample Application here. The zip file is named gmap_ms4w_ms410.zip.
  4. Again, unzip this file at the root of your C:\ drive and it will automatically be placed into the folder C:\ms4w\apps\gmap.
  5. Download the ka-Map Javascript API from the same page. This file is named ka-map-ms4w-1.0.zip.
  6. Again, unzip this file to the root of your C:\ drive and it will automatically be placed into the folder C:\ms4w\apps\ka-map-1.0.
  7. Navigate to C:\ms4w and double-click on the file named apache-install.bat. In one-click, you’ve setup your web server and MapServer is ready to use.
  8. Open your web browser and goto http://localhost/. You should see an Introduction to MapServer 4 Windows page.
  9. Scroll to the bottom of the page and click the ka-Map Sample Interface link. This will load up the sample application we downloaded in step 3 using the ka-Map interface. The map should look like this:

kamap1

kamap2
Congratulations! You’ve just setup a mapping website. In short, ka-Map is basically a web page front-end for MapServer that is similar to Google Maps. MapServer is used to generate map images in the form of map tiles and ka-Map then presents them to the user so they can pan, zoom, identify, and search the map. More details to follow in later posts.

1 comment:

Post a Comment