Google Maps API

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

0 comments

Post a comment

    Post a comment
    Embed Video
    Edit your comment Cancel

    1 Favorite

    Google Maps API - Presentation Transcript

    1. Google Maps API Dr. Harry Chen CMSC 491S/691S March 26, 2008
    2. Agenda
      • “ Fire hose” course on Google Maps API
        • HelloWorld example
        • Basic UI components
        • Loading data
      • Assignment #3
    3. HelloWorld What happened here?
    4. “View  Page Source” Google Maps API Key (required)
    5. What’s involved
      • Define a <div/> tag where the map is to be created (“map_canvas”)
      • Load GMaps API in <head/>
      • Register the “initialize()” function to be called when the event “onload” is fired
    6. The initialize() function
      • Checks if your browser is supported by the GMaps API
      • Creates a GMap2 object and initializes the map UI inside the DOM element ID “map_canvas”
      • Centers the map to a given lat/lng value
    7. Key Map Controls Control: Zoom Control: Map Type Control: Overview http://code.google.com/apis/maps/documentation/controls.html#Controls_overview Control: Pan
    8. Control Code Example
    9. GMarker Markers : Use GMarker to create markers
    10. Customize GMarker Use your own marker icon Use a smaller marker icon http://code.google.com/apis/maps/documentation/overlays.html#Markers
    11. OpenInfoWindowHtml This func creates GMarker
    12. On Creating GMarker
      • We have seen how to create GMarkers on a map, and our data is hardwired
      • Unless your map data is static, you will need to load location data dynamically
      • How to load data?
    13. On loading data
      • Option 1: Define data in the <head/> of your map page
      • Option 2: Read from a GeoRSS file
      • Option 3: Read from a KML file
      • Option 4: Read from a custom XML file
    14. Read from a GeoRSS/KML file
      • What’s GeoRSS? What’s KML?
      So easy!
    15. Read from a custom XML file
      • Some app only produce proprietary data in XML
      • In order to render this data on a map, you must read and parse XML
      • Sounds complicated?
    16. Read from a custom XML GDownloadUrl: Built-in for downloading any data from a remote URL GXml: XML parser!
    17. Resources
      • Google Maps’ Developer Guide
        • http://code.google.com/apis/maps/documentation/index.html
      • Mike Williams’s Google Maps API Tutorial
        • http://econym.googlepages.com/index.htm
    18. Assignment #3

    + hchen1hchen1, 2 years ago

    custom

    2164 views, 1 favs, 0 embeds more stats

    http://tinyurl.com/2flvsk

    More info about this document

    CC Attribution-NonCommercial LicenseCC Attribution-NonCommercial License

    Go to text version

    • Total Views 2164
      • 2164 on SlideShare
      • 0 from embeds
    • Comments 0
    • Favorites 1
    • Downloads 61
    Most viewed embeds

    more

    All embeds

    less

    Flagged as inappropriate Flag as inappropriate
    Flag as inappropriate

    Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

    Cancel
    File a copyright complaint
    Having problems? Go to our helpdesk?

    Categories