Archive for the ‘Google Earth API’ Category

Building Advanced 3D Geographical Applications for the Web with the Google Earth API

Thursday, May 28th, 2009

By Roman Nurik from the Google team.  

This is the final geo session for Google I/O 2009.  Links for Roman’s presentation can be found HERE

As Roman pointed out, this marks the 1 year anniversary of the Google Earth API.  New features over the last year include:

  • Mac Support
  • KML Tour Playback
  • Underwater Terrain
  • Mars mode
  • Enterprise server connectivity
  • Over 80 samples in the demo gallery

Roman introduced ‘My Earth’ a mashup of the new Google MyMaps Data API and the Google Earth API.

MyEarth MyMaps on Google Earth API

 

 

 

 

 

 

To support the app, he’s released new Earth API open source libraries:

  1. geojs which provides common geo math and geometries
  2. earth-api-utility-library (GEarthExtensions)
  • creates KML objects via ‘JSONic’ methods
  • new methods for feature by id, dom walk, and ‘clear’ features
  • Animations/effects framework
  • 1-line draggable placemarks and line strings
  • Screen overlay ‘Buttons’ including a control set like MyMaps geometry editing
  • Apache 2.0 License

Other Recent Developments G_SATELLITE_3D_MAP has been upgraded significantly:

  • all KML features supported in ggeoXML will now transer to the Earth mode
  • it appears that javascript based updates to ggeoXML now propagate to the Earth mode
  • 3D objects within KML called by ggeoXML will now show in Earth mode even though don’t in the 2D modes
  • switches to and from the Earth mode now include nicer animations in tilt and rotation

All in all a great session with some fun new tools!

Google Earth API Updated to Version 5.0

Thursday, April 2nd, 2009

Google has released a new version of the Google Earth API and Plugin today.  Based on the release notes, there are a lot of goodies for users and developers.  

The upgrade extends recent Google Earth 5.0 client features into the Plugin including Tour Playback and Ocean Content as mentioned by Frank Taylor at Google Earth Blog.  

Basic timeline support is also available - an oft requested feature since the release of the plugin last May (it’s really been almost a year!).  Play the DestinSharks.com Death Valley Driving Tour with the new Plugin - this was one of the 1st KML files to use the original timeline support in Google Earth 4.  If you don’t see the timeline, you’ll need to uninstall the GE Plugin and reinstall it to get the latest version. 

Further improving custom event handling, Google has added 3 new event handler routines for capturing user interaction with the map via the GEView object: viewchangebegin, viewchange, and viewchangeend.  This way you don’t need to use a custom function like the one we demonstrated previously.  

New methods for getting the current view bounds and for determining the streaming status for imagery and terrain are also available.  

Google Earth Enterprise customers get the ability to configure Plugin instances to use their custom Google Earth servers - providing Enterprise customers the option to use the GE Client, GE Plugin, and Google Maps as ways to disseminate custom datasets.  Google has updated the API documentation and posted Release Notes for the upgrades.

Create a Simple MoveEnd Event Listener for the Google Earth API

Friday, November 21st, 2008

The Google Earth API provides a rich toolset for developers to create custom content and interfaces within Google Earth’s rich 3D world.  For existing Google Maps developers, many of the Earth API’s methods are similar and previous Google Maps mashups can be ported - but not all.

While working on an upcoming project, we discovered that the current Earth API lacks the nice ‘moveend’ event listener found in Google Maps.  With some pointers from the Google Earth team (thanks Mano!), we developed our own simple ‘moveend’ listener based on the ‘frameend’ event which is supported.

What is ‘frameend’?

frameend is an Earth API event which fires anytime the map image frame is re-rendered (ie when the map view changes).  Unlike the Google Maps ‘moveend’ event, the frameend event fires continuously during a move.  This is great for some applications as it gives a nearly continuous event stream, but doesn’t work so well for functions that you might want to rate limit (like creating custom data based on the view center).

Since we needed to extend frameend in any case, we went ahead and added a few extra parameters that can be adjusted to fine-tune the refresh parameters.  In our new function, you can configure the following:

  • Minimum movement requirements in Latitude or Longitude
  • Minimum zoom change independent of a Lat/Lon change
  • Minimum time since last update to rate limit calls to our follow-on function

Try It Out and Get the Sample Code:

Try it out with our Interactive Google Earth API MoveEnd Event Listener Demo .  You can adjust the default movement thresholds to get a feel for how various settings change the event behavior.  View the page source for a look at the sample code implementation.

Have your own example?  Please drop us a line at feedback@maplify.com so we can feature it also.