SlideShare a Scribd company logo
Google Maps API Dr. Harry Chen CMSC 491S/691S March 26, 2008
Agenda “ Fire hose” course on Google Maps API HelloWorld example Basic UI components Loading data Assignment #3
HelloWorld What happened here?
“View    Page Source” Google Maps API Key (required)
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
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
Key Map Controls Control: Zoom Control: Map Type Control: Overview http://code.google.com/apis/maps/documentation/controls.html#Controls_overview Control: Pan
Control Code Example
GMarker Markers : Use GMarker to create markers
Customize GMarker Use your own marker icon Use a smaller marker icon http://code.google.com/apis/maps/documentation/overlays.html#Markers
OpenInfoWindowHtml This func creates GMarker
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?
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
Read from a GeoRSS/KML file What’s GeoRSS? What’s KML? So easy!
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?
Read from a custom XML GDownloadUrl: Built-in for downloading any data from a remote URL GXml: XML parser!
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
Assignment #3

More Related Content

What's hot (13)

PPTX
Using SharePoint's Geolocation Field - SPSUK 2014
Mark Stokes
 
PDF
Google Maps JS API
Alberto Simões
 
PDF
GeoNerdsDC Presentation 2011-08-02
Glenn Waldron
 
PPTX
FOSS4G-NA 2012 : ReadyMap - OpenLayers in 3D
Glenn Waldron
 
PPTX
Make Android development easier
Lucas de Almeida Marciano
 
PDF
Google Cloud lightning talk @MHacks
wesley chun
 
PPTX
Android Kit Kat - Printing Framework
Paul Lammertsma
 
PPTX
Mapping with Drupal and OpenLayers
thomasturnbull
 
PDF
Responsive Maps in WordPress
Alicia Duffy
 
PPTX
Printing photos-html-using-android
Ketan Raval
 
PPT
Hybrid Application Development for Maemo N900 Device using Qt Webkit - Discov...
Raj Lal
 
PDF
Hands on with the Google Maps Data API
ss318
 
PPTX
Child Abduction Response Team (CART): Delivering Rapid Community Response Usi...
Safe Software
 
Using SharePoint's Geolocation Field - SPSUK 2014
Mark Stokes
 
Google Maps JS API
Alberto Simões
 
GeoNerdsDC Presentation 2011-08-02
Glenn Waldron
 
FOSS4G-NA 2012 : ReadyMap - OpenLayers in 3D
Glenn Waldron
 
Make Android development easier
Lucas de Almeida Marciano
 
Google Cloud lightning talk @MHacks
wesley chun
 
Android Kit Kat - Printing Framework
Paul Lammertsma
 
Mapping with Drupal and OpenLayers
thomasturnbull
 
Responsive Maps in WordPress
Alicia Duffy
 
Printing photos-html-using-android
Ketan Raval
 
Hybrid Application Development for Maemo N900 Device using Qt Webkit - Discov...
Raj Lal
 
Hands on with the Google Maps Data API
ss318
 
Child Abduction Response Team (CART): Delivering Rapid Community Response Usi...
Safe Software
 

Viewers also liked (20)

PPTX
Google maps api 3
Muhammad Younis
 
PDF
Ubilabs: Google Maps API - Best Practices
Martin Kleppe
 
PDF
Putting Your Data on a Map
Shawn Day
 
PPTX
Augview presentation GE user conference bali 2014 - MIke Bundock
Geo AR Games
 
PDF
Best Web-based Data Visualization tools
Atchai
 
PPT
An Overview of Web GIS and Location Based Services
webmapsolutions
 
ODP
Google Maps API
Dave Ross
 
PPT
Geospatial Web
hchen1
 
PPTX
SportsDataViz using Plotly, Shiny and Flexdashboard - PlotCon 2016
Tanya Cashorali
 
PDF
Geolocation and mapping using Google Maps services
Ivano Malavolta
 
PPTX
MySQL Introduction
mysql content
 
PDF
Google Maps API for Android
Maksim Golivkin
 
PPT
Delivering location-based services using GIS, WAP, and the Web: two applications
Sergio Luján Mora - Universidad de Alicante
 
PPT
File Upload
webhostingguy
 
PDF
Introduction to MySQL
Giuseppe Maxia
 
PPS
Introduction to Mysql
Tushar Chauhan
 
PPT
MySql slides (ppt)
webhostingguy
 
PDF
Visualisation of Complex 3D City Models on Mobile Webbrowsers Using Cloud-bas...
Martin Christen
 
PPTX
OpenStreetMap in 3D using Python
Martin Christen
 
PDF
Big Data Visualization
Raffael Marty
 
Google maps api 3
Muhammad Younis
 
Ubilabs: Google Maps API - Best Practices
Martin Kleppe
 
Putting Your Data on a Map
Shawn Day
 
Augview presentation GE user conference bali 2014 - MIke Bundock
Geo AR Games
 
Best Web-based Data Visualization tools
Atchai
 
An Overview of Web GIS and Location Based Services
webmapsolutions
 
Google Maps API
Dave Ross
 
Geospatial Web
hchen1
 
SportsDataViz using Plotly, Shiny and Flexdashboard - PlotCon 2016
Tanya Cashorali
 
Geolocation and mapping using Google Maps services
Ivano Malavolta
 
MySQL Introduction
mysql content
 
Google Maps API for Android
Maksim Golivkin
 
Delivering location-based services using GIS, WAP, and the Web: two applications
Sergio Luján Mora - Universidad de Alicante
 
File Upload
webhostingguy
 
Introduction to MySQL
Giuseppe Maxia
 
Introduction to Mysql
Tushar Chauhan
 
MySql slides (ppt)
webhostingguy
 
Visualisation of Complex 3D City Models on Mobile Webbrowsers Using Cloud-bas...
Martin Christen
 
OpenStreetMap in 3D using Python
Martin Christen
 
Big Data Visualization
Raffael Marty
 
Ad

Similar to Google Maps API (20)

PDF
Intro To Google Maps
Eric ShangKuan
 
PPTX
Code to Add Google Map to Websites
Fortune Innovations Dublin
 
PPT
Google Geo APIs Overview
Ossama Alami
 
PPT
Google Maps API
Rafael Mumme
 
PDF
Maps API on_mobile_dev_festbangkok
ss318
 
PPTX
Adobe MAX 2009: Making Maps with Flash
Ossama Alami
 
PDF
Web Mashup Slides For Lesson 1
Alvin Chua
 
KEY
Google Maps bakes the crust, you add the toppings
Nael El Shawwa
 
PPTX
What's that Building? Using Google's Map API to Create a Campus Map
Tony Miller
 
PDF
Mapstraction
lokku
 
PDF
Geolocation and Mapping
Ivano Malavolta
 
PPT
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Ossama Alami
 
PPT
Open Maps (Or Close Enough?)
Pamela Fox
 
PDF
Staticmaps cloudmade-internal-april-2009
Andrii Mishkovskyi
 
PDF
Google Developer Day 2010 Japan: Android や iPhone で活用する Maps API のモバイル端末向け新機能...
Google Developer Relations Team
 
PDF
Maps V2... And You!
CommonsWare
 
PDF
Google Maps Api
Anas Alpure
 
PDF
Getting Oriented with MapKit
Juio Barros
 
PDF
Gnome Maps: free software services for a new desktop experience
Vrije Universiteit Brussel
 
Intro To Google Maps
Eric ShangKuan
 
Code to Add Google Map to Websites
Fortune Innovations Dublin
 
Google Geo APIs Overview
Ossama Alami
 
Google Maps API
Rafael Mumme
 
Maps API on_mobile_dev_festbangkok
ss318
 
Adobe MAX 2009: Making Maps with Flash
Ossama Alami
 
Web Mashup Slides For Lesson 1
Alvin Chua
 
Google Maps bakes the crust, you add the toppings
Nael El Shawwa
 
What's that Building? Using Google's Map API to Create a Campus Map
Tony Miller
 
Mapstraction
lokku
 
Geolocation and Mapping
Ivano Malavolta
 
Performance and Scalability for Maps API Sites (Dev Fest '10 Mexico)
Ossama Alami
 
Open Maps (Or Close Enough?)
Pamela Fox
 
Staticmaps cloudmade-internal-april-2009
Andrii Mishkovskyi
 
Google Developer Day 2010 Japan: Android や iPhone で活用する Maps API のモバイル端末向け新機能...
Google Developer Relations Team
 
Maps V2... And You!
CommonsWare
 
Google Maps Api
Anas Alpure
 
Getting Oriented with MapKit
Juio Barros
 
Gnome Maps: free software services for a new desktop experience
Vrije Universiteit Brussel
 
Ad

More from hchen1 (13)

PPT
Semantic Web 2.0
hchen1
 
PPT
Semantic HTML
hchen1
 
PPT
Geonames
hchen1
 
PPT
OpenSearch
hchen1
 
PPT
RSS and Atom in the Social Web
hchen1
 
PPT
An Introduction to Ajax Programming
hchen1
 
PPT
Machine Tags
hchen1
 
PPT
Web 2.0 Mashups
hchen1
 
PPT
Gnizr Architecture (for developers)
hchen1
 
PPT
Folksonomy and Tagging in the Social Web
hchen1
 
PPT
Developing Java Web Applications
hchen1
 
PPT
Inside Gnizr
hchen1
 
PPT
Social Web Technologies
hchen1
 
Semantic Web 2.0
hchen1
 
Semantic HTML
hchen1
 
Geonames
hchen1
 
OpenSearch
hchen1
 
RSS and Atom in the Social Web
hchen1
 
An Introduction to Ajax Programming
hchen1
 
Machine Tags
hchen1
 
Web 2.0 Mashups
hchen1
 
Gnizr Architecture (for developers)
hchen1
 
Folksonomy and Tagging in the Social Web
hchen1
 
Developing Java Web Applications
hchen1
 
Inside Gnizr
hchen1
 
Social Web Technologies
hchen1
 

Recently uploaded (20)

PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
PDF
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
PDF
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
PDF
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
PDF
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PDF
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
PDF
Complete Network Protection with Real-Time Security
L4RGINDIA
 
PPTX
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
PDF
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
PDF
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
PDF
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
PDF
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
DevBcn - Building 10x Organizations Using Modern Productivity Metrics
Justin Reock
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
OpenID AuthZEN - Analyst Briefing July 2025
David Brossard
 
Why Orbit Edge Tech is a Top Next JS Development Company in 2025
mahendraalaska08
 
Exolore The Essential AI Tools in 2025.pdf
Srinivasan M
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
New from BookNet Canada for 2025: BNC BiblioShare - Tech Forum 2025
BookNet Canada
 
CIFDAQ Weekly Market Wrap for 11th July 2025
CIFDAQ
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
CIFDAQ Token Spotlight for 9th July 2025
CIFDAQ
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
The Builder’s Playbook - 2025 State of AI Report.pdf
jeroen339954
 
Complete Network Protection with Real-Time Security
L4RGINDIA
 
Building Search Using OpenSearch: Limitations and Workarounds
Sease
 
HubSpot Main Hub: A Unified Growth Platform
Jaswinder Singh
 
SWEBOK Guide and Software Services Engineering Education
Hironori Washizaki
 
NewMind AI Journal - Weekly Chronicles - July'25 Week II
NewMind AI
 
Achieving Consistent and Reliable AI Code Generation - Medusa AI
medusaaico
 

Google Maps API

  • 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
  • 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
  • 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