Google Earth API Samples - Fetch Bad KML

Last Modified:
Installed Plugin Version:

Relevant Resources:

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) {
    // wrap alerts in API callbacks and event handlers
    // in a setTimeout to prevent deadlock in some browsers
    setTimeout(function() {
      alert('Bad or null KML.');
    }, 0);
}, '', finished);