Tuesday, March 13, 2007

Posting KML on a Web Server

If you wish to post a KML file on web server to share it with others, there are several things to keep in mind.

First, for users to open these files in Google Earth, you need to add MIME types to the server. These are:
  • application/vnd.google-earth.kml+xml kml
  • application/vnd.google-earth.kmz kmz
Of course, you can simply post your KML on the Google Earth Community boards and not worry about MIME types :-)

Next, consider using network links. These are KML files which automatically refresh content as it changes on the server. With a network link, users do not need to download the latest version of your KML each time its content changes. This works great for dynamic KML data. Learn more.

Lastly, users can also view a limited set of KML content in Google Maps if the KML file is already on a web server. Just go to maps.google.com, type in the URL of the KML file and click Search Maps. In the resulting page, click Link to this page, copy the URL and share it the world. Here is an example of a KML file as shown in Google Maps; it represents a hike in Colorado.

4 comments:

Greg said...

Great post! I had heard that you could view KMZ files in Google Earth, but did not know how it was done. Thanks for posting this info.

Unknown said...

Ooh, things I didn't know (but should have)! Thanks,

Roy Weil said...

Note: There is a file size limit for the KMZ file using Google maps, but not for Google Earth. Last time I checked it was about 1 MB, but I could not find anything official from Google.

bwright123 said...

Hi,
Maybe you can clarify a bit?

What are MIME types and how do I add them to the server?

I want to create points in GE that also display a photo and some text for a humanitarian organisation I work with in Uganda.

I think I can only do this by posting my GE KMZ file on a site, opening it in Google Maps, attaching the relevant photos then exporting it back to GE.

Will this work or am I creating too much work for myself?

'Preciate your help
Bernard