Archive for the ‘Demos’ Category

Interactive YouTube Search within Google Earth

Monday, February 2nd, 2009

Thanks to new features in Google Earth 5, we can now provide an interactive YouTube map search capability directly within Google Earth.  Simply specify your keywords and start browsing around the world for matching videos.  You can change your keywords at any time directly from your Google Earth ‘Places’ menu.

Get Started

Follow these simple steps to get started:

  1. Download and Install Google Earth 5 if you haven’t already from http://earth.google.com
  2. Create a starter query at the Maplify YouTube Map Search Page
  3. Get your Google Earth network link by clicking the ‘Get Google Earth File’ button
  4. Open the network link in Google Earth and browse away

To change your keywords in Google Earth, just click on the ‘Maplify YouTube Query Control’ link in your Google Earth places menu, update your keywords, and move the map to refresh the query.

When moving the map, the YouTube layer will update roughly 5 seconds after you’ve stopped moving or zooming.

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.