How can I rotate the view of a geoplot?

16 views (last 30 days)
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,
name = 'opentopomap';
url = '';
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, ...
posX = 9.95;
posY = 46.38;
pathX = [9.87 9.92 9.95 posX];
pathY = [46.27 46.3 46.35 posY];
gx = geoaxes;
geolimits([posY-0.15 posY+0.15],[posX-0.15 posX+0.15])
% view([90 90])

Accepted Answer

Vimal Rathod
Vimal Rathod on 9 Jul 2020
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

More Answers (0)

Community Treasure Hunt

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

Start Hunting!