You are on page 1of 40

Google Earth API

An Introduction to the Google Earth Browser Plugin JavaScript API

By Kerstin Pittl
01/07/2010
Introduction
• $whoami
• What?
Agenda
• Browser Plugin
• Basic API
• Open source Libraries
• Integrate with Google Maps
• 3D Models
• Tourplayer
• Q&A
Browser Plugin
• http://code.google.com/apis/earth/
Browser Plugin
• Microsoft Windows (2000, XP, Vista and 7)
– Google Chrome 1.0+
– Internet Explorer 7+ (32-bit)
– Firefox 2.0+
• Apple Mac OS X 10.4+ (Intel and PowerPC)
– Google Chrome 1.0+
– Safari 3.1+
– Firefox 3.0+
• No Linux Support yet (Issue 117)
Basic API
• Hello Earth

Demo
Basic API
• Layers & Controls
LAYER_TERRAIN, LAYER_BUILDINGS etc.
Basic API
• KML

Demo
Basic API
• Camera
Basic API
• Markers

Additional Options for custom Icons, rollover icons


Basic API
• Polylines
Basic API
• Polygon
Basic API
• Polygon Styles
Basic API
• Overlays
Basic API
Demo
Basic API
• Functions
Basic API
Demo
Basic API
Open Source Libraries

• geojs
• GEarthExtensions
GEOJS
• Must have tool for Google Maps and Earth
http://code.google.com/p/geojs
Apache 2.0 License

geo Namespace
geo.Point geo.math
geo.Path geo.util
geo.Polygon
geo.Bounds
GEOJS
• geo.util
isUndefined, isObject etc
• geo.math
distance, bearing, heading, midpoint etc
• geo
Polygon.containsPoint, Polygon.area, Bounds.center,
Point, Path.bounds etc
GEarthExtensions
• http://code.google.com/p/earth-api-utility-library
Apache 2.0 License

simplify interaction with Google Earth API


features and events
GEarthExtensions
• New way of creating features

stockIcon String (Optional) A convenience property to set


the point placemark's icon to a stock icon, e.g.
'paddle/wht-blank'. Stock icons reside under '
http://maps.google.com/mapfiles/kml/...'.
Basic API
• Markers

Additional Options for custom Icons, rollover icons


GEarthExtensions
• New way of creating features

stockIcon String (Optional) A convenience property to set


the point placemark's icon to a stock icon, e.g.
'paddle/wht-blank'. Stock icons reside under '
http://maps.google.com/mapfiles/kml/...'.
GEarthExtensions
• Polylines
GEarthExtensions
• Polygons
GEarthExtensions
Demo

~30 lines of code vs. ~90 lines of code


GEarthExtensions
 
 
 
GEarthExtensions
• Effects Fx Namespace
GEarthExtensions
Demo
Integrate with Google Maps
• G_SATELLITE_3D_MAP
Google Maps
Demo
Tour Player
• KMLTour Playlist
Tour Player
Tour Player
Demo
Tour Player
3D Models
• Animate Models from Google Sketch up
3D Models
Demo
Questions

???

You might also like