Friday, May 29, 2009

Hey Maps API and Earth API developers, we just beefed up G_SATELLITE_3D_MAP!

When the Earth API launched back in May 2008, there was a simultaneous addition to the Maps API that allowed creating an 'Earth' map type with just a single line of code:

map.addMapType(G_SATELLITE_3D_MAP);
Figure 1: Old version

This was really the first time that the 2D world of Google Maps and the 3D world of Google Earth came together. Users could navigate content publishers' geographic content in 2D or 3D, whichever they desired.

However, there were a few limitations with G_SATELLITE_3D_MAP. For example, only Maps markers and polylines were synchronized in 2D and 3D. Other overlay types were not kept in sync. Also, the transition from 2D and 3D wasn't as transparent to the user as it could've been. See Figure 1 to the right for an artist's depiction of the feature set.

Today, we're excited to announce a completely rewritten and 'beefed up' G_SATELLITE_3D_MAP (see Figure 2), available now in the latest experimental version of the Maps API (currently 2.160). While the usage is the same (simply use the line of code above), the overlay/feature synchronization is much more extensive, the 2D/3D transitioning is seamless, and the overall Maps/Earth integration is much stronger.

Most common Maps API overlays are now supported: markers, polylines, polygons, ground overlays, screen overlays, and even GGeoXml objects are automatically mirrored in the Google Earth Plugin. In fact, GGeoXml works in an especially powerful way: although Maps may not display all KML from a GGeoXml (i.e. 3D models), the Earth Plugin will show all the content, in all its 3D glory.

If you're as psyched as I am about the new features and want to give them a go, check out these demos and the short screencast below:

To enable the new Maps/Earth integration on your site, simply load the experimental Maps API version using:

google.load('maps', '2.160');

and add the G_SATELLITE_3D_MAP map type. When Maps API v2.160 or later becomes version '2', the new Maps/Earth integration will replace the old version, which will then only be available by hard coding to version 2.159 or earlier in the google.load statement.

Lastly, if you have any trouble with the new integration code, please post in the Maps API or Earth API developer forums. Also see the Earth API notify group announcement for more details on this release.