how fetch kml google earth api -
my fetch kml not work. here code:
function initcallback(object) { ge = object; ge.getwindow().setvisibility(true); function finished(object) { if (!object) { settimeout(function() { alert('bad or null kml.'); }, 0); return; } ge.getfeatures().appendchild(object); } var url = 'http://localhost/ta/bangun.aula.kml'; google.earth.fetchkml(ge, url, finished); document.getelementbyid('installed-plugin-version').innerhtml = ge.getpluginversion().tostring(); }
kml file not directly parsed js in browser. google needs access kml file. need place kml file google can access (host online). since kml file on localhost , google not able access it.
Comments
Post a Comment