removeCustomBasemap

Remove custom basemap

Description

example

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

Examples

collapse all

Add a custom basemap to view locations on an OpenTopoMap® basemap, then remove the custom basemap from siteviewer.

Initialize simulation variables to:

  • Define the name that you will use to specify your custom basemap.

  • Specify the website that provides the map data. The first character of the URL indicates which server to use to get the data. For load balancing, the provider has three servers that you can use: a, b, or c.

  • Create an attribution to display on the map that gives credit to the provider of the map data. Web map providers might define specific requirements for the attribution.

  • Define a display name for the custom map.

name = 'opentopomap';
url = 'a.tile.opentopomap.org';
copyright = char(uint8(169));
attribution = copyright + "OpenStreetMap contributors";
displayName = 'Open Topo Map';

Use addCustomBasemap to load the custom basemap, and then create a siteviewer object that loads the custom basemap.

addCustomBasemap(name,url,'Attribution',attribution','DisplayName',displayName)
viewer = siteviewer('Basemap',name);

After a custom basemap is added to siteviewer, the custom map is available for future calls to siteviewer. Note the 'Open Topo Map' icon in the Imagery tab.

siteviewer;

Use removeCustomBasemap to remove the custom basemap from future calls to siteviewer. Note the 'Open Topo Map' icon is no longer available in the Imagery tab.

removeCustomBasemap(name)
siteviewer;

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