40
Google Earth API An Introduction to the Google Earth Browser Plugin JavaScript API By Kerstin Pittl 01/07/2010

Google Earth

Embed Size (px)

DESCRIPTION

An Introduction to the Google Earth Browser Plugin JavaScript API

Citation preview

Page 1: Google Earth

Google Earth APIAn Introduction to the Google Earth Browser Plugin JavaScript API

By Kerstin Pittl01/07/2010

Page 2: Google Earth

Introduction

• $whoami• What?

Page 3: Google Earth

Agenda

• Browser Plugin• Basic API• Open source Libraries• Integrate with Google Maps• 3D Models• Tourplayer• Q & A

Page 4: Google Earth

Browser Plugin

• http://code.google.com/apis/earth/

Page 5: Google 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)

Page 6: Google Earth

Basic API

• Hello Earth

Demo

Page 7: Google Earth

Basic API

• Layers & ControlsLAYER_TERRAIN, LAYER_BUILDINGS etc.

Page 8: Google Earth

Basic API

• KML

Demo

Page 9: Google Earth

Basic API

• Camera

Page 10: Google Earth

Basic API

• Markers

Additional Options for custom Icons, rollover icons

Page 11: Google Earth

Basic API

• Polylines

Page 12: Google Earth

Basic API• Polygon

Page 13: Google Earth

Basic API

• Polygon Styles

Page 14: Google Earth

Basic API

• Overlays

Page 15: Google Earth

Basic API

Demo

Page 16: Google Earth

Basic API

• Functions

Page 17: Google Earth

Basic API

Demo

Page 18: Google Earth

Basic API

Page 19: Google Earth

Open Source Libraries

• geojs• GEarthExtensions

Page 20: Google Earth

GEOJS

• Must have tool for Google Maps and Earthhttp://code.google.com/p/geojsApache 2.0 License

geo Namespacegeo.Point geo.mathgeo.Path geo.utilgeo.Polygongeo.Bounds

Page 21: Google Earth

GEOJS

• geo.utilisUndefined, isObject etc

• geo.mathdistance, bearing, heading, midpoint etc

• geo Polygon.containsPoint, Polygon.area, Bounds.center, Point, Path.bounds etc

Page 22: Google Earth

GEarthExtensions

• http://code.google.com/p/earth-api-utility-libraryApache 2.0 License

simplify interaction with Google Earth API features and events

Page 23: Google Earth

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/...'.

Page 24: Google Earth

Basic API

• Markers

Additional Options for custom Icons, rollover icons

Page 25: Google Earth

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/...'.

Page 26: Google Earth

GEarthExtensions

• Polylines

Page 27: Google Earth

GEarthExtensions

• Polygons

Page 28: Google Earth

GEarthExtensions

Demo

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

Page 29: Google Earth

GEarthExtensions

Page 30: Google Earth

GEarthExtensions

• Effects Fx Namespace

Page 31: Google Earth

GEarthExtensions

Demo

Page 32: Google Earth

Integrate with Google Maps

• G_SATELLITE_3D_MAP

Page 33: Google Earth

Google Maps

Demo

Page 34: Google Earth

Tour Player• KMLTour Playlist

Page 35: Google Earth

Tour Player

Page 36: Google Earth

Tour Player

Demo

Page 37: Google Earth

Tour Player

Page 38: Google Earth

3D Models

• Animate Models from Google Sketch up

Page 40: Google Earth

Questions

???