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

Post on 11-Jan-2016

212 views 0 download

Tags:

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

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

workmanr1@southernct.educhanj2@southernct.edugschwendera1@southernct.edu

Southern Connecticut State University

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

The Atlas of Fiction

Google Map Examples

HousingMaps/Times Square 2005

RunwayFinder: a flight planning tool

Indiana University Interactive Campus Map

Google Map Examples

Tufts UniversityCampus Compass

Williams College Emmanuel College

SCSU Maps

Directions to the CSU Campuses

SCSU Students

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

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

Creating the SCSU Student Map

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

Effect of recruiting campaigns

Creating the SCSU Student Map

Before you begin, you’ll need

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

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.

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>

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.

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.

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/

DCU Directions – I290 Exit 16

DCU Center

Google – I290 Exit 13

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

Yahoo I290 Exit 13

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