Hello! I already have a weather balloon data script on matlab and I just want to transfer that data into google earth. What do I need to add on the script? I already downloaded the Google Earth Plug-in. I found this on web, but I don't know what is a function init()…
var ge;
google.load('earth', '1');
function init() {
google.earth.createInstance('map3d', initCallback, failureCallback);
}
function initCallback(pluginInstance) {
ge = pluginInstance;
ge.getWindow().setVisibility(true);
%add a navigation control
ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);
%add some layers
ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true);
ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true);
%just for debugging purposes
document.getElementById('installed-plugin-version').innerHTML =
ge.getPluginVersion().toString();
}
function failureCallback(errorCode) {
}

 채택된 답변

Kelly Kearney
Kelly Kearney 2014년 6월 12일

1 개 추천

If you have the Mapping Toolbox, it comes with a few functions: kmlwrite, kmlwriteline, kmlwritepoint.
If not, there are also plenty of high-rated options in the File Exchange, like this, and this, and this,

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Google Earth에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by