0

I am having an issue with Google Maps not displaying my program generated KML file (see that question). My question is if there is a way to turn on more verbose errors so I can see if there is an error with my program generated KML file or if there is a different issue.

Community
  • 1
  • 1
Mike Wills
  • 20,959
  • 28
  • 93
  • 149
  • 1
    See my answer. KML layer has a getStatus method to find out why isn't it working. http://stackoverflow.com/questions/26933638/program-generated-kml-file-validates-but-doesnt-work/26976214#26976214 – ffflabs Nov 17 '14 at 15:37
  • @amenadiel Make a simple answer here about `getStatus()` and I will mark as answer. – Mike Wills Nov 17 '14 at 16:47

1 Answers1

1

Specifically for KML layers, set a listener for the status_changed event and display the layer's status:

var newKml = new google.maps.KmlLayer({ 
    url: VALID_KML_URL_HERE
});
newKml.setMap(map);

google.maps.event.addListenerOnce(newKml, 'status_changed', function () {
    console.log('KML status is', newKml.getStatus());
});
ffflabs
  • 17,166
  • 5
  • 51
  • 77