Google Earth

Preview:

DESCRIPTION

An Introduction to the Google Earth Browser Plugin JavaScript API

Citation preview

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

By Kerstin Pittl01/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 & ControlsLAYER_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 Earthhttp://code.google.com/p/geojsApache 2.0 License

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

GEOJS

• geo.utilisUndefined, isObject etc

• geo.mathdistance, bearing, heading, midpoint etc

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

GEarthExtensions

• http://code.google.com/p/earth-api-utility-libraryApache 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

Questions

???

Recommended