Code covered by the BSD License  

Highlights from
Google Earth Toolbox

image thumbnail
from Google Earth Toolbox by scott lee davis
Various plotting/drawing functions that can be saved as KML output, and loaded in Google Earth

demo_ge_point()
function demo_ge_point()%% Demo ge_point
% Example usage of the ge_point function.
%   X, Y should be decimal coordinates (WGS84)
%   Z is altitude in meters
% 'help ge_point' for more info.

t = 0:pi/20:1.5*pi;

iconStrBase = 'http://maps.google.com/mapfiles/kml/pal3/';

tmp = ge_point(sin(t),cos(t),t*1e6,...
                        'iconURL',[iconStrBase,'/icon35.png'],...
                    'msgToScreen',true,...
                           'name','');

kmlStr01 = ge_folder('many points',tmp);
clear tmp

kmlStr02 = ge_point(-1,2,3.56,...
                    'iconURL',[iconStrBase,'/icon18.png']);

kmlStr03 = ge_point(0,2,3.56,...
                    'iconURL',[iconStrBase,'/icon41.png'],...    
    'description',['<A HREF="http://cod',...
    'e.google.com/p/googleearthtoolbox/">Visit the GoogleEarth Toolb',...
    'ox for MATLAB website</A><BR><BR>']);

kmlStr04 = ge_point(1,2,3.56,...
                        'iconURL',[iconStrBase,'/icon31.png'],...);
                        'pointDataCell',{'var1','value1';...
                                         'var2','value2';...
                                         'var3','value3';...
                                         'var4','value4';...
                                         'var5','value5';});



ge_output('demo_ge_point.kml',[kmlStr01,kmlStr02,kmlStr03,kmlStr04],...
                                 'name',mfilename);

Contact us at files@mathworks.com