Navigations

ChewOnTech.com is looking out for our fans to join us! us today

Google Search

Google
 

Sunday, April 08, 2007

KML and GeoRSS Support Added to the Google Maps API

Digg! Slashdot Slashdot It!

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("http://kml.lover.googlepages.com/my-vacation-photos.kml");

map.addOverlay(gx);

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.

No comments: