Monday, January 21, 2008

Custom Google Earth Applications with Network Links

As posted previously, there are five general ways in which to provide custom control to Google Earth.

  1. Use built-in network links and server side scripting to serve custom data dynamically.
  2. Embed the Google Earth render window into your own application.
  3. Build customized applications that always hover over Google Earth.
  4. Use JavaScript in the built in web browser.
  5. Use a Flash application in a pop-up balloon.
Using this first option does not really use the API, nor does it really let you modify the user interface. It uses the very flexible, built-in, KML capabilities that the Google Earth client provides for free.

To use it, you need to have a web server that can respond to a network link request from Google Earth. The request can have a number of client parameters in it, such as the view information. This can be used to generate a return KML document whose content is based on the area that a user is looking at. A network link KML file can be added to Google Earth that sends this request to update the KML document on a time basis, or whenever the user zooms and stops.

This method can get pretty sophisticated. The Regions KML tag allows users to define the visual region of interest for specified data in the KML document. This is a great way to handle very large datasets.

A network-link KML document can be created that defines a number of different, thematic, KML documents, which can be loaded and unloaded every time the user enters a defined region. Brian Flood offers an excellent example of how this can be applied to large geospatial data sets using Arc2Earth.

No comments:

Post a Comment