advanced google maps api

16
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

Upload: hchen1

Post on 01-Nov-2014

9.832 views

Category:

Technology


2 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Advanced Google Maps API

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

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

Agenda

EventsOverlaysGoogleBarStreetView

Page 4: Advanced Google Maps API

Simple GMaps Event

Say something when the user clicks…

Try this

* Make sure you click the map

Page 5: Advanced Google Maps API

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

Passing Arguments in Events

Try this

Page 7: Advanced Google Maps API

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

GMaps Overlay in Action

http://nycsubway.eyebeamresearch.org/

Page 9: Advanced Google Maps API

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

We’ve seen overlays last time…

Page 11: Advanced Google Maps API

Other overlay examples

Page 12: Advanced Google Maps API

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

An Example

Try this

Page 14: Advanced Google Maps API

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

StreetView Example

Try this

Page 16: Advanced Google Maps API

Questions?