How to update current webmap instead of creating a new one during simulation?

Function for Simulink:
function ShowPath(lat_target, lon_target, lat_curr, lon_curr)
% drawnow
coder.extrinsic('webmap');
coder.extrinsic('geoshape');
coder.extrinsic('fullfile');
coder.extrinsic('wmmarker');
coder.extrinsic('wmline');
wm = webmap('World Imagery');
s = geoshape([lat_target lat_curr],[lon_target lon_curr]);
iconDir = fullfile('C:\Users\andre\OneDrive');
iconFilename = fullfile(iconDir,'pngwing.com (1).png');
wmmarker(lat_target,lon_target,'Icon',iconFilename)
iconDir = fullfile('C:\Users\andre\OneDrive');
iconFilename = fullfile(iconDir,'curr.png');
wmmarker(lat_curr,lon_curr,'Icon',iconFilename)
wmline(s,'Color', 'blue', 'Width', 1);
end
lat_target and lon_target are unchangeable parameters. lat_curr and lon_curr are changed in the modeling process (the data is taken from the simulink model).
How to update the map during the simulation without opening a new one every time?

Antworten (0)

Produkte

Version

R2021a

Gefragt:

am 27 Jul. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by