Main Content

camtargm

Set camera target for axesm-based map using geographic coordinates

Syntax

camtargm(lat,long,alt)
[x,y,z] = camtargm(lat,long,alt)

Description

camtargm(lat,long,alt) sets the axes CameraTarget property of the current axesm-based map to the position specified in geographic coordinates. The inputs lat and long are assumed to be in the angle units of the current axesm-based map.

[x,y,z] = camtargm(lat,long,alt) returns the camera target in the projected Cartesian coordinate system.

Examples

Look down the spine of the Andes from a location three Earth radii above the surface.

axesm('globe','galt',0)
gridm('glinestyle','-')
load topo60c
geoshow(topo60c,topo60cR,'DisplayType','texturemap');
demcmap(topo60c)
lightm(-80,-180); 
material(0.6*[ 1 1 1])
plat = 10;
plon = -65; 
tlat = -30;
tlon = -70;
camtargm(tlat,tlon,0); 
camposm(plat,plon,3);
camupm(tlat,tlon); 
camva(20)
set(gca,'CameraViewAngle',30)
land = shaperead('landareas.shp','UseGeoCoords',true);
linem([land.Lat],[land.Lon])
axis off

Upside-down globe showing South America

Version History

Introduced before R2006a