How do i show and update markers in two side-by-side webmaps?
Show older comments
I created 2 webmaps. I tried to use a simple loop to update a marker in each map. However, only the marker in the last webmap show up. See my code below:
wm_array{1} = webmap('WorldStreetMap');
wm_array{2} = webmap('WorldStreetMap');
Disp_Loc_Lat{1} = [MSP1(1); ]; % some lat for webmap1
Disp_Loc_Lon{1} = [MSP1(2); ]; % some lon for wemap1
Disp_Loc_Lat{2} = [CBRG(1)]; %some lat for webmap 2
Disp_Loc_Lon{2} = [CBRG(2)]; % some lon for webmap2
for i = 1 : 10
for curMap = 1 : length(wm_array)
wmmarker(wm_array{curMap}, Disp_Loc_Lat{curMap}, Disp_Loc_Lon{curMap}, ...
'Description', ['test ' num2str(curMap) ' ' num2str(i)]);
end
end
Answers (0)
Categories
Find more on Matrices and Arrays in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!