Main Content

wmremove

Remove overlay on web map

Description

example

wmremove() removes the overlay most recently inserted into the current web map.1

example

wmremove(h) removes the overlay or overlays specified by the scalar overlay handle or vector of overlay handles, h.

Examples

collapse all

Draw a marker on a web map. wmmarker creates the web map. Pause, and then remove the marker overlay.

wmmarker(42, -73);
pause(1);
wmremove()

Draw several marker overlays on a web map. wmmarker creates the web map. Pause, and then remove the marker overlays, specifying a vector of overlay handles.

h1 = wmmarker(42, -80);
h2 = wmmarker(42, -78);
pause(1);
wmremove([h1 h2])

Create a web map.

wm = webmap();

Load coastline data and display it as an overlay on the web map.

load coastlines
h = wmline(coastlat, coastlon);

Remove the overlay specified by h.

wmremove(h)

Input Arguments

collapse all

Web map overlay, specified as a scalar overlay handle or a vector of overlay handles.

Version History

Introduced in R2013b

1 Alignment of boundaries and region labels are a presentation of the feature provided by the data vendors and do not imply endorsement by MathWorks®.