KML and GeoRSS Support Added to the Google Maps API

Wednesday, March 21, 2007 at 4:08:00 PM

One of the things I love most about Google Maps and Google Earth is that it's easy for anyone to create and display new geographically referenced content. Whether it's pictures from your vacation, favorite places on the globe, or the hiking trails you like to visit, all you have to do is create a KML file (using Google Earth or any other tool) and load it up. This idea that you can view data from external sources inside Google Maps and Earth is really exciting to us, and I'm pleased to announce two major new features in this area.

To start we now support GeoRSS as a data format for geographic content in Google Maps. We want to enable users to create data in whatever format is most convenient for them, and feel that by supporting both KML and GeoRSS we can enable a wider variety of people and applications to contribute content to Google Maps. We've built support for the Simple, GML, and W3C Geo encodings of GeoRSS -- all you have to do is enter the full URL of a GeoRSS file into the Maps query box to load the file. For example, take a look at SlashGeo's GeoRSS on Google Maps.

Most importantly, we've extended support for displaying geographic data -- both KML and GeoRSS -- into the Google Maps API. Now in addition to programatically adding content to a Maps API site, you can create your content as KML or GeoRSS and load it into the Map with a simple function call. This means that the more than 1 million KML files that are available from all over the web can easily be mashed up with the map on your site. For example, you can add some vacation photos from Japan with the following code:

var gx = new GGeoXml("");

This makes it easier for API sites to maintain content in a flexible format that can be accessed via the API or in a number of other tools directly, and makes it simpler to create a rich API site with declarative content, instead of a lot of code.

Below is an example that shows KML and GeoRSS layers rendered on a Google Maps API powered map. You can toggle on and off the sample layers, or feel free to enter a URL to your favorite KML or GeoRSS content and hit the 'Add' button to see it on the map.

More information about how to use these new features can be found in the Maps API documentation. Google Maps currently supports KML files with points, lines, polygons, styles, icons, and network links (without view-based refresh). We plan to add support for ground overlays, screen overlays, folders, and visibility in the near future.

We're eager to hear from the developer community on what you think of this new API, and additions you'd like to see to make it even easier to use KML and GeoRSS content on your site.

Note: Since this is a newly released feature, you must specify v=2.x (instead of v=2) in the script tag for the next 2 weeks for it to be loaded properly.