Google Earth API Samples - Fetch Bad KML

Last Modified:
08/04/08

Relevant Code Excerpt:

// in this sample we will purposely attempt
// to fetch a bad KML file (one that doesnt exist)

function finished(object) {
  if (!object) {
    alert('bad or NULL kml');
  }
}

google.earth.fetchKml(ge, 'http://www.google.com/fakePlacemark.kml', finished);