Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property...

16
Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material to be shared for non- commercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the author. Robert Workman Jian Lian Chan Adam Gschwender [email protected] du [email protected] gschwendera1@southernc t.edu Southern Connecticut State University Slideshow Link http://home.southernct.edu/~workmanr1/NERCOMP.ppt

Transcript of Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property...

Page 1: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Campus Google Map Applications

Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material to be shared for non-commercial, educational purposes, provided that this copyright statement appears on the reproduced materials and notice is given that the copying is by permission of the author. To disseminate otherwise or to republish requires written permission from the author.

Robert WorkmanJian Lian Chan

Adam Gschwender

[email protected]@[email protected]

Southern Connecticut State University

Slideshow Link http://home.southernct.edu/~workmanr1/NERCOMP.ppt

Page 2: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

The Atlas of Fiction

Google Map Examples

HousingMaps/Times Square 2005

RunwayFinder: a flight planning tool

Page 3: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Indiana University Interactive Campus Map

Google Map Examples

Tufts UniversityCampus Compass

Williams College Emmanuel College

Page 4: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

SCSU Maps

Directions to the CSU Campuses

SCSU Students

Driving DirectionsWilliams College | VisitorsVisiting Amherst College: Driving DirectionsMaps & Directions - Boston College

Page 6: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Benefits of the Map

•A map is a picture, which is worth a thousand words.•It gives a new dimension in analyzing data.•Depending on the setup, you can import new data, becoming a new map.•It has educational value. You can incorporate the following into your lesson:

•HTML•Javascript•PHP•MySQL•XML

•Concept of separation of data and design•Importance of raw data and graphical representation of data•Database design

Page 7: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Creating the SCSU Student Map

PurposeMaps can be created that show changes in enrollment from oneyear to another.

Effect of recruiting campaigns

Page 8: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Creating the SCSU Student Map

Before you begin, you’ll need

•A website•A MySQL database•Some knowledge of HTML, Javascript, XML, PHP

Page 9: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Creating the SCSU Student Map

Steps

•Sign up for an API Key from Google.•Read the API Documentation.•Get a list of student data from registrar of only: City, State, Zip•Import the data into a database table.

Page 10: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Creating the SCSU Student Map

Steps

•Set up a PHP page to read from the table, displaying it as XML.

•Set up a webpage to display the map. Include the API Key.

<markers><marker lat="41.2721" lng="-72.965" num_students="121" payload="121 are students from 06516" icon="../graphics/markers/marker-purple.png"/><marker lat="41.3172" lng="-72.928" num_students="120" payload="120 are students from 06511" icon="../graphics/markers/marker-purple.png"/>..</markers>

<script src="http://maps.google.com/maps?file=api&v=1&key=abcdefg" type="text/javascript"></script>

Page 11: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Creating the SCSU Student Map

Steps

•Include JavaScript code provided by the API Documentation•Set the page to read from the XML-generated PHP file.•Refer to the tutorial.

Page 12: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Problems Encountered

At this time, Google Maps only accept longitude/latitude values.

Solution: Set up a database table containing zip codes and its longitude/latitude alias. Data comes from the US Census website. Use the table for conversion.

Google is expected to make changes into the API. If you will be working on a map project, heed this warning.

Page 13: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

References

Google Maps API Documentation: http://www.google.com/apis/maps/documentation/Google Map Mania: http://googlemapsmania.blogspot.comGeocoder.us: a free US address geocoder: http://geocoder.us WorldKit geocoder: http://brainoff.com/worldkit/geocoderTables to convert zip code to lat/long: http://www.zipcodeworld.com/

Page 14: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

DCU Directions – I290 Exit 16

DCU Center

Page 15: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Google – I290 Exit 13

Google Local - from: 501 Crescent St 06515 to: 30 Worcester Center Boulevard 01608

Page 16: Campus Google Map Applications Copyright Robert Workman 2006 This work is the intellectual property of the author. Permission is granted for this material.

Yahoo I290 Exit 13

Yahoo! Driving Directions - New Haven, CT to Worcester, MA