Google Maps API v3 Adds KML, Traffic, and Bike Routes

Developers working with Google's next generation of its popular mapping API (our Google Maps API Profile) will be pleased to learn that some new features have been added to the API. Since its initial release a little less than a year ago, v3 of the Google Maps API has steadily been growing in terms of new features like driving directions and new functionality access to elevation data. The latest addition of features are three new "layer classes" that make it dead simple to add KML (or GeoRSS), traffic, or bike routes as overlays on a Google Map.

Thor Mitchell writes about the release of these new layer classes on the Google Geo Developer Blog:

From humble beginnings in Google Earth, KML support can now be found in a wide variety of mapping products and services. Today we’re happy to add Maps API v3 to this list with the introduction of the new KmlLayer class. The KmlLayer class enables KML or GeoRSS files that are hosted on publicly accessible web sites to be rendered in a Maps API v3 application.

The KmlLayer class is just one of several new layer classes we’re adding to Maps API v3 today. A layer class handles a collection of overlays that are added to the map as a single entity. In addition to the KmlLayer class, we are also adding a TrafficLayer class and a BicyclingLayer class.

You can easily test out these new layer classes on a web page that includes samples for each layer (note that in the screenshot below I loaded up some KML from the Gulf of Mexico Oil Spill resource page set up by Google's Crisis Response team).

You'll find the documentation for the new layer classes has been added to the standard reference documentation. Although the news may seem subtle at first, the release of these layer classes opens up a broad range of opportunities for developers. Given that the Google Maps API v3 is geared towards working well on mobile web apps, the new layer classes will make it even easier to get data integrated into mobile map mashups. The BicyclingLayer class by itself could be quite useful for providing a lightweight bicycle routing app and the breadth of publicly available KML layers on the web can enrich just about any mapping app.

Be sure to read the next Mapping article: Developers: Foursquare Wants to Show Off Your Apps