advanced google maps api
DESCRIPTION
TRANSCRIPT
This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/us/
Advanced Google Maps API
Dr. Harry Chen
CMSC 491S/691S
March 31, 2008
Previously on Google Maps API…
A HelloWorld exampleKey components of GMaps API
Controls and GMarkers
How to read GeoRSS and KML
Agenda
EventsOverlaysGoogleBarStreetView
Simple GMaps Event
Say something when the user clicks…
Try this
* Make sure you click the map
Events in GMaps
Events in a Google Map are generated by the “GMap2” object. For example, an event is fired when … … a map type is added … the map is clicked … a double-click is done on the map … the map view starts changing … the zoom level is changed … the user starts to drag the mouse
For the full list, see GMaps.Event doc
Passing Arguments in Events
Try this
Remove Listener!
If you created an Event Listener in GMaps, you’re responsible to remove this listener.
Failure to do so could exhaust the computing resources on the client machine.
http://code.google.com/apis/maps/documentation/events.html#Removing_Event_Listeners
GMaps Overlay in Action
http://nycsubway.eyebeamresearch.org/
What’s Overlays
Overlays are objects on the map that are tied to latitude/longitude coordinates, so they move when you drag or zoom the map. Overlays reflect objects that you "add" to the map to designate points, lines, or areas.
http://code.google.com/apis/maps/documentation/overlays.html
We’ve seen overlays last time…
Other overlay examples
GoogleBar
Allows you add Google Local Search capability on a map
Works the similar to the Google AJAX Search API
An Example
Try this
StreetView
Adds 360 degree views of the roads in the major cities.
http://www.youtube.com/watch?v=91wuBqlny50
StreetView Example
Try this
Questions?