What should this feature enhancement do?
Error happened when a local KML file (e.g. c:\pentagon.kml) is fetched by
using fetchKml and nothing appeared by using KmlNetworkLink.
Are there any known workarounds that produce the similar results?
1. Save the attached kml file to "C:\pentagon.kml":
2. In the web page, add the two javascript functions
// Fetch kml from a file or url. Called by Web Browser.
function fetchkml()
{
url = 'c:/pentagon.kml';
google.earth.fetchKml(ge, url, fetchkml_finished);
}
// Callback function after a KML or KMZ file is fetched.
function fetchkml_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);
return;
}
// call external to inform the file is loaded.
ge.getFeatures().appendChild(object);
// Fly to the Pentagon
var lookAt = ge.createLookAt('');
lookAt.set(38.867, -77.0565, 500, ge.ALTITUDE_RELATIVE_TO_GROUND, 0,
45, 900);
ge.getView().setAbstractView(lookAt);
}
3. run fetchkml function. Error happens on the line: google.earth.fetchKml
(ge, url, fetchkml_finished);
Original issue reported on code.google.com by qlu...@yahoo.com on 2 Mar 2009 at 3:27
Original issue reported on code.google.com by
qlu...@yahoo.com
on 2 Mar 2009 at 3:27Attachments: