How can I rotate the view of a geoplot?

37 次查看(过去 30 天)
Hi
I would like to plot a flight path on a map and rotate the view on the map so that the latest heading is pointing towards the top (or a simpler formulation: I would like to rotate the view of a geoplot). However, it seems like I cannot rotate the view of the geoplot using e.g. view() or 'Rotate' tool.
The simple code I am using as an example is below.
Is there a way to rotate the view of the plot I am doing below? Or is there another way to plot on a map and then rotate?
Thanks in advance.
Kind regards,
Arno
name = 'opentopomap';
url = 'a.tile.opentopomap.org';
copyright = char(uint8(169));
attribution = [ ...
"map data: " + copyright + "OpenStreetMap contributors,SRTM", ...
"map style: " + copyright + "OpenTopoMap (CC-BY-SA)"];
displayName = 'Open Topo Map';
addCustomBasemap(name,url,'Attribution',attribution, ...
'DisplayName',displayName)
posX = 9.95;
posY = 46.38;
pathX = [9.87 9.92 9.95 posX];
pathY = [46.27 46.3 46.35 posY];
gx = geoaxes;
geoplot(posY,posX,'*r',pathY,pathX,'-b')
geobasemap(name)
geolimits([posY-0.15 posY+0.15],[posX-0.15 posX+0.15])
% view([90 90])

采纳的回答

Vimal Rathod
Vimal Rathod 2020-7-9
Hi,
The geoplot function is designed in such a way that it doesn't allow rotation of the plot. The rotation is included in geoplot3 function. It is used with geoglobe which has the ability to rotate the globe and considering your use case of plotting flight path, geoplot3 would be useful as it also takes into account the altitude of the flight which would give you greater accuracy during plotting and you would also have proper visualization as you require.
Refer to the following links to know more about geoplot3 and geoglobe functions

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Geographic Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by