Don't stare out the window to track Santa - use Google Maps or Earth instead!

Sunday, December 23, 2007 at 3:24:00 PM

As announced on the Google blog in November, we've partnered with NORAD to provide real-time Santa tracking via iGoogle, Youtube, Google Earth, and the Google Maps API. The tracking started at 2AM MST today, and will continue until Santa's finished his global route at 2AM tomorrow. And since we're all about dishing technical details here, we figured we'd give you an inside scope on the Maps API & KML implementations!

In the Maps API tracker (screenshot below), the map displays a Santa icon for his current location, gift icons for previously visited locations, and play icons for locations with embedded Youtube clips. Every 5 minutes, Santa's position updates to a new nearby location. Here are some of the Maps API features we used:

  • The open sourced Marker Manager with a modification to auto-open the info window on the santa marker.
  • GControl extensions to create the special 'Find Santa' and 'Zoom to World' left-hand controls.
  • The newly added Terrain map type (G_PHYSICAL_MAP).
  • Localized map controls and messages for the 6 supported languages, passed in through the hl= parameter in the script tag.



In the Google Earth KML tracker file (screenshot below), you'll see a 3-d model of Santa and his reindeer changing locations, with a smooth fly-in to each location.

The general design principle here is that every client should fetch the model of Santa only once and then, every minute or so, we simultaneously update its location and move the camera to the new position.

The basic mechanism is an initial file with two NetworkLinks: one to fetch the <Model> KML file, and one to fetch the <Update> KML file every 60 secs. The update uses <Change> to adjust the coordinates of the model's <Location>, and it also includes a new <LookAt> position.

The NetworkLink that fetches the update has <flyToView> enabled and the LookAt of the update KML is what drives the viewer to the new location of the model. The Updates in KML document provides additional details for those interested.