advanced google maps api
DESCRIPTION
TRANSCRIPT
![Page 1: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/1.jpg)
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
![Page 2: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/2.jpg)
Previously on Google Maps API…
A HelloWorld exampleKey components of GMaps API
Controls and GMarkers
How to read GeoRSS and KML
![Page 3: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/3.jpg)
Agenda
EventsOverlaysGoogleBarStreetView
![Page 4: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/4.jpg)
Simple GMaps Event
Say something when the user clicks…
Try this
* Make sure you click the map
![Page 5: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/5.jpg)
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
![Page 6: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/6.jpg)
Passing Arguments in Events
Try this
![Page 7: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/7.jpg)
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
![Page 8: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/8.jpg)
GMaps Overlay in Action
http://nycsubway.eyebeamresearch.org/
![Page 9: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/9.jpg)
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
![Page 10: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/10.jpg)
We’ve seen overlays last time…
![Page 11: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/11.jpg)
Other overlay examples
![Page 12: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/12.jpg)
GoogleBar
Allows you add Google Local Search capability on a map
Works the similar to the Google AJAX Search API
![Page 13: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/13.jpg)
An Example
Try this
![Page 14: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/14.jpg)
StreetView
Adds 360 degree views of the roads in the major cities.
http://www.youtube.com/watch?v=91wuBqlny50
![Page 15: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/15.jpg)
StreetView Example
Try this
![Page 16: Advanced Google Maps API](https://reader033.vdocuments.net/reader033/viewer/2022061112/5456b006b1af9f33608b4bba/html5/thumbnails/16.jpg)
Questions?