G 410/510 Web GIS

D. Percy

Assignment 3- Integrating your local data with external base layers in OpenLayers

electronic submission is okay

Part 1.

Read and watch the following tutorial

Using Mapserver and Openlayers

Use "http://bjpd.geos.odin.pdx.edu/cgi-bin/mapserv.cgi" for your CGI location

Assuming that you used "test.map" as the name of your mapfile from excercise 1, use "/home/yourusername/public_maps/test.map" for your mapfile location. Make sure that your mapfile works with your php_test.php script from assignment 1.

For example, your full URL might be http://bjpd.geos.odin.pdx.edu/cgi-bin/mapserv.cgi?mode=map&map=/home/cbg/public_maps/test.map

Change STATUS to DEFAULT for all layers in your mapfile. Leave STATUS ON at the top of your mapfile.

You should be able to load "http://yourusername.geos.odin.pdx.edu/lite.html" and see a map. Remember to rt-click on any pink tiles to view useful error messages.

Part 2

Incorporate other "widgets" and functionality from the openlayers examples (overview, layerswitcher, etc). Pay attention to projections! You should be sure that your local data are stored in lat/lon (decimal degrees), preferably in WGS84 in order to overlay easily with other data sets.

You may want to copy the Openlayers library to your account on odin for speed.

Here's a link to my working version . View the page source to see how it is set up.

More examples:

This is a nice example of several controls in one demo:

http://bjpd.geos.odin.pdx.edu/OpenLayers/examples/controls.html

More

Add an annotation layer that can be toggled on/off using the layerswitcher sample mapfile, sample html

working version .

Make one of your layers queryable (use getfeatureinfo.html as your template)

Set up a layer as a WMS service. Test it either by using ArcMap or the getfeatureinfo.html.
Example WMS
Example mapfile

Online documentation

Example templates: header, body, footer
More about templates

Steps:
Copy Openlayers to public_maps
Open openlayers/examples/getfeatureinfo.html, you should see pink tiles
Using WinSCP duplicate getfeatureinfo.html to mygetfeatureinfo.html
Copy a working layer definition from Part 2 above into this file. Keep the layer named wms, but replace the rest.
Add map.setCenter
Delete the Proxy CGI line
copy test.map to test_ows.map
Add "WMS_FEATURE_INFO_MIME_TYPE "text/html" to the WEB section of your mapfile.
Copy """DUMP TRUE through End # Metadata""" to your Counties layer definition
In the metadata section change GML_include and WMS_include to "NAME, POP1990"
Copy the GMNA_query template to counties_template.html, and change the contents top [NAME] [POP1990]
Change the path to the template. Change the layer type to WMS (from MapServer)
Change the name of the mapfile called in your mygetfeatureinfo.html to test_ows.map

Some questions to answer:

1) What is the purpose of this exercise?

2) What resources do you have to complete it?

3) What specific changes do you have to make to individual files to accomplish your task?

4) Find three online webmapping sites. List the available tools and functionality of each.
Critique each site, describing what you find useful, what could be better, and how you would change it.
Can you figure out what specific technology they are using? (ArcIMS, OpenLayers, etc)
What features from these sites would you like to be able to incorporate into your final project?