Google Groups Home
Help | Sign in
Group info
Members: 35778
Activity: High activity
Language: English
Group categories:
Science and Technology > Earth Sciences
Computers > Internet
More group info »
Recent pages and files
More Info Kml On Google Maps    

KML (Keyhole Markup Language) is an XML-based language for managing three-dimensional geospatialdata in the program Google Earth, Google Maps and Google Mobile. The word Keyhole is an earlier name for the software that became Google Earth.

 

http://en.wikipedia.org/wiki/Keyhole_Markup_Language 

 

format example:

  <?xml version="1.0" encoding="UTF-8"?>
 <kml xmlns="http://earth.google.com/kml/2.0">
 <Placemark>
   <description>New York City</description>
   <name>New York City</name>
   <Point>
     <coordinates>-74.006393,40.714172,0</coordinates>
   </Point>
 </Placemark>
 </kml>

 

update: <Network Links> are now available in the API though GeoXML

Official Post: http://googlemapsapi.blogspot.com/2007/10/better-kml-support-in-maps-api-dynamic.html

 

Important note on using KML & KMZ on your hosted server

Windows: 

Set the MIME on the server for accessing kml/kmz for Google Earth, Google Maps & Google Maps API  reads KML and KMZ files.
The standard MIME type for KML files is

    * application/vnd.google-earth.kml+xml

The standard MIME type for KMZ files is

    * application/vnd.google-earth.kmz

For Apache, add these lines to the httpd.conf file or a .htaccess file in the same folder (if your host only allows htaccess rather than httpd.conf access):

    * AddType application/vnd.google-earth.kml+xml .kml
    * AddType application/vnd.google-earth.kmz .kmz 

For Linux:

    * AddType application/vnd.google-earth.kml+xml .kml  

    * AddType application/vnd.google-earth.kmz .kmz  

      Application: opt/google-earth/googleearth

 


The Google server doesn't know or care whether you use these particular MIME types but some webservers will refuse to serve the files if they have no MIME type for them. Many webservers use a default MIME type (mine uses "text/plain") for files that they have no specific MIME information for, and that works. 

If your webserver refuses to serve files with the extension .KML, then rename your *.KML files to *.TXT. 

 

Multipurpose Internet Mail Extensions (MIME) types instruct a Web browser or mail application how to handle files received from a server
http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Librar...

 

For GeoRSS MIME:

 

application/georss+xml 

 

 

Examples: 

 

KML format, and loading in KML file on map (polygons/markers/HTML):

http://econym.googlepages.com/kml.htm

 

Loading in different KML files on same map with mouse interaction: 

http://andrerenaut.ovh.org/wp/?cat=58


Google Map to KML to XML then to Google Maps API

Simple step by step guide to overlay your data on Google Map API via Google Maps/Google Earth

http://mapperz.blogspot.com/2006/11/google-maps-directions-via-kml-google.html

 

KML on Google Maps via Google Spreadsheets

KML Loaded into Google Spreadsheets then used in Google Maps

source:http://spreadsheets.google.com/pub?key=phRmoRD2Q-V_mFA-Tckq7dw


Test your KML directly on map (without saving to server):

http://www.thechrisoshow.com/display_kml


KML Tutorial and Documentation:

http://earth.google.com/kml/kml_tut.html


Utilities:


GPS Visualizer Google Maps form: Read data in many formats (including KML), and plot it using the Google Maps API.
http://www.gpsvisualizer.com/map?form=google


GPS Visualizer KML Overlays: Create alternate overlays for use with Google Earth.
http://www.gpsvisualizer.com/kml_overlay

 

GIS Data to KML: Read and write data to Google Earth (KML) from over 150 popular GIS, CAD and database formats.
http://www.safe.com/google/index.php


RoboGeo: Geotag photos and export to Google Earth, Google Maps, Flickr, MapPoint, Shapefiles or DXF Files.
http://www.robogeo.com/

 

KML File Organisers: Use to reorder or group KML files

http://www.nearby.org.uk/group-kml.php       - Sort into Country/Region Groups
http://www.nearby.org.uk/sort-kml.php       - Sort into Alphabetical Order
http://www.nearby.org.uk/elevation-kml.php   - Add Altitude Data


Issues with large KML files:
 

If your KML polylgons have too many points, making the file too big for Google Maps, you could try reducing them using the c# program to be found on the files page of this site (ro644ck (141) saved as .zip). This uses the Douglas Peucker line simplification routine (ex GSHHS distribution) to reduce the number of points in the polygons inside a KML file. Use parameters of 'infile outfile spacing' where spacing is the minimum difference you want between the output nodes in kilometres e.g. 0.001. You will need the .NET runtime to use the posted .exe file or a copy of c# (free from MS) to compile the program for MS windows. Posted code should work for lat/lon/alt coordinates or lat/lon only coordinates.


Alternatively, GPS Visualizer's mapping utility has a built-in function for reducing the number of points in a track, as does GPSBabel.

 

Using Google Maps API and Mike Williams EGeoXml it is possible to load large KML files (1mb tested here) On a fast connection takes approx 35 seconds to load, but it does load all KML features. Next to control the 'Area of Interest' and exclude data beyond a bounding box.

http://mapperz.kml.googlepages.com/UK_Postcodes_Large_KML.html

 


Version: 
Latest 3 messages about this page (15 total) - view full discussion
Oct 18 2007 by mapperz@googlemail.com
update: <Network Links> are now available in the API though GeoXML
Official Post: http://googlemapsapi.blogspot.com/2007/10/better-kml-support-in-maps-api-dynamic.html
volunteers for the updating Pamela's Tutorial to support this method?
http://code.google.com/support/bin/answer.py?answer=65622&topic=11369
Jun 21 2007 by mapperz@googlemail.com
Using Google Maps API and Mike Williams EGeoXml it is possible to load
large KML files (1mb tested here) On a fast connection takes approx 35
seconds to load, but it does load all KML features. Next to control
the 'Area of Interest' and exclude data beyond a bounding box.
http://mapperz.kml.googlepages.com/UK_Postcodes_Large_KML.html
May 20 2007 by asteronimo
Hi,
I have developed a Google Maps interface for XBOX.
Maybe you are interested in that?
- asteronimo
12 more messages »
Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google