Translate this page:


Google Maps API Tutorial - GGeoXml

© 2007, 2008, 2009 Mike Williams



The GGeoXml() feature creates an overlay from a KML file.

You use it like this:

   var kml = new GGeoXml("");
Here's an example

Potential Pitfalls

  1. The KML file must be accessible by the Google KML rendering server. It won't work with KML files on your local computer. You don't get any error messages if the KML file is inaccessible.
  2. GGeoXml overlays don't support .hide() and .show() methods. To hide them, use map.removeOverlay().
  3. Calling map.removeOverlay() on a GGeoXml overlay recovers the memory used, and destroys the information. Once you use map.removeOverlay(xml), you have to re-create it before calling map.addOverlay(xml) again.
Back to Mike's Homepage
Up to the start of this tutorial