www.gusucode.com > map 案例源码 matlab代码程序 > map/UseCameraParameterToSpecifyViewExample.m

    %% Use Camera Parameter to Specify View
%
%%
% Specify the latitude and longitude values that define the point that you
% want to view. In this example, the location is Mount Ranier.
lat_rainier = 46.8533;
lon_rainier = -121.7599;
%%
% Create a geopoint vector to specify the position of the virtual camera
% (eye) you will use to view the location using the |Camera| parameter.
myview = geopoint(46.7, -121.7,'Altitude',2500,'Tilt',85,'Heading',345);
%%
% Define the name of the KML file you want to create.
filename = 'Mt_Ranier.kml';
%%
% Write the point data to the file, specifying a name and a custom color
% for the icon.
kmlwritepoint(filename,lat_rainier,lon_rainier,'Name','Mt Rainier',...
         'Color','red','IconScale',2,'Camera',myview)