1
我已經安裝了Google地球插件,它似乎正常工作。如何在Chrome中啓動Google地球插件
我想要做的是打開一個KML文件(從Android上的MyTracks導出)。
但是,我無法找到打開KML文件或啓動GE插件的選項。
這可能嗎?
我已經安裝了Google地球插件,它似乎正常工作。如何在Chrome中啓動Google地球插件
我想要做的是打開一個KML文件(從Android上的MyTracks導出)。
但是,我無法找到打開KML文件或啓動GE插件的選項。
這可能嗎?
要啓動該插件,請查看developer's guide中的'Using the Google Earth Api'部分。
對於加載KML文件,看看下面的文檔https://developers.google.com/earth/documentation/kml
它給出瞭如何fetchKml and parseKml以及鏈接到working example例子。
var href = 'http://code.google.com/'
+ 'apis/earth/documentation/samples/kml_example.kml';
google.earth.fetchKml(ge, href, function(kmlObject) {
if (kmlObject) {
ge.getFeatures().appendChild(kmlObject);
}
});
你也可以使用一個KmlNetworkLink
來load the data再次文檔鏈接到這個working example。
var link = ge.createLink('');
var href = 'http://code.google.com/'
+ 'apis/earth/documentation/samples/kml_example.kml'
link.setHref(href);
var networkLink = ge.createNetworkLink('');
networkLink.set(link, true, true); // Sets the link, refreshVisibility, and flyToView
ge.getFeatures().appendChild(networkLink);