Main Content

removeCustomBasemap

Remove custom basemap

Description

removeCustomBasemap(basemapName) removes the custom basemap specified by basemapName from the list of available basemaps.

If the custom basemap specified by basemapName has not been previously added using the addCustomBasemap function, the removeCustomBasemap function issues an error.

example

Examples

collapse all

Add a custom basemap to view locations on an OpenStreetMap® basemap.

name = "openstreetmap";
url = "a.tile.openstreetmap.org/${z}/${x}/${y}.png";
copyright = char(uint8(169));
attribution = copyright + "OpenStreetMap contributors";
addCustomBasemap(name,url,"Attribution",attribution)

Use the custom basemap with a geographic bubble chart.

lat = [42.3501 42.3515 42.3598 42.3584 42.3529];
lon = [-71.0870 -71.0926 -71.0662 -71.0598 -71.0662];
gb = geobubble(lat,lon,"Basemap","openstreetmap", ...
    "BubbleWidthRange",25,"MapLayout","maximized", ...
    "ZoomLevel",14);

Figure contains an object of type geobubble.

Remove the custom basemap.

removeCustomBasemap(name)

Input Arguments

collapse all

Name of the custom basemap to remove, specified as a string scalar or character vector. You define the basemap name when you add the basemap using the addCustomBasemap function.

Data Types: string | char

Version History

Introduced in R2018b