I am trying to plot arrowheads on the lines between two geospatial points (latitude, longitude pairs) on Matlab without success. To plot just the lines without the arrowheads, I am using the following:
path = loadGPSPoints();
[lttrk,lntrk] = track(path);
geoshow(lttrk,lntrk,'DisplayType','line','color','r');
The track function builds a list of coordinates that allows the geoshow function to build a set of lines between these coordinates. However, I have no control over these lines. They are, apparently, one object. So I cannot add arrowheads to the end of each point in the path.
The annotation() function does not work because it does not add the arrow annotation as part of the map. That is, if a zoom in or out the map, for example, the arrow gets displaced.
I also tried the function arrow() function from http://www.mathworks.com/matlabcentral/fileexchange/278 but it apparently does not work with maps.
Finally, I looked into the quiverm() function but it does not allow me to specify two different coordinates. Its application seems incompatible to what I need.
Any other ideas?
To plot stuff manually to a
geoshowfigure, the trick is to usemfwdtranto convert the lat/long data to the figure coordinate system. Then you can usearrowlike normal. Here is an example building on the example from http://www.mathworks.com/help/toolbox/map/ref/track.html :By the way, you can also specify a
Markerproperty in your calls togeoshow. For example: