Michael Peterson's Google Maps

Exercises from this PDF file:

First Map

Second Map

Third Map

Fourth Map

Fifth Map

Sixth Map

Sixth Map with Picture (New)

Modified Examples from the Book

Chapter 1:

1-1 The first kml example won't work if it's placed in myfolder: Modified 1-1 that doesn't work

But it will work if it's placed on another server: Modified 1-1 that works

Notice how this KML will open in Google Earth. Right-mouse on the file and try it out. By the way, use Google Earth to get your coordinates. The procedure that Kerstin showed with Google maps does not provide very precise coordinates.

Don't do the Wayfaring Map.

Chapter 2:

2-1 Set center to your house/apartment

The following uses php and won't work on the myweb server: 2-2 and 2-3 Set center to your house/apartment

 

Going through examples on the Google Maps API Version 2 Documentation

Rather than pursuing the php path, let's try some more examples from this Google page:

http://www.google.com/apis/maps/documentation/#Creating_Icons

Using Icon Classes

Let's start with creating icons and use the random number generator to put a bunch of markers on the map.

7th Map (change the area and the number of points plotted)

Draggable Marker

Let's do the draggable marker over your location:

8th Map (change the location)

Encoded Polylines

Let's draw some lines on the map. You'll need to use the interactive polyline encoder utility to get convert the latitude/longitude to the text string:

9th Map (change the location and lines)

Using XML and Asynchronous HTTP with Maps

This one was a real challenge. At first, I couldn't even get the unaltered version to work. I came back a little later and all of a sudden it was working. Even the original from the Google website doesn't plot out all 4 points, only 3, although there are 4 points in the XML file.

10th Map (original version)

The same thing happened with this map of the university. At first, I couldn't get the points to plot but I came back after a while and it worked. The points were acquired from Google Earth.

10th Map (change the location and points)

Custom Map Controls

11th Map (change the location and size of controls)

Custom Overlays

Notice how I added a loop in the load function that draws a series of squares:

for (var i = 2; i < 12; i++) {
...}

I also changed the thickness of the line and made the map the shape of a square.

12th Map (change the location and the number of rectangles)

GeoCoder Example

13th Map (change the size of the map, the location, and the default address)

Extracting Structured Address Information

14th Map (change the location and the addresses)

 

Google Maps Week 3

The exercise for this week is to Geocode a series of addresses for Omaha using:

http://www.batchgeocode.com/

and then insert the addresses into an XML file, as in Map 10. Modify the size of the icons so they like those in Map 7. Kerstin has the addresses for the Omaha movie theaters.

Crime Data for Omaha in zip format (use Save Target As...) This data needs to be put into a form for batchgeocode. Once you get the lat/long coordinates, put them into an XML marker file.

Google Maps Week 4

Crime Map

15th Map (make symbols smaller)

Continue with php examples in book. Load files to geoserver.

Submit title of presentation for GIS conference by Tuesday.