Main Content


Remove custom basemap



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


collapse all

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

Specify values for these arguments:

  • A name that identifies the custom basemap.

  • The URL of the map tiles. For load balancing, this provider has three servers that you can use (a, b, or c).

  • An attribution that gives credit to the provider of the map tiles. When you plot data, this attribution appears at the bottom of the map. Map tile providers can define specific requirements for the attribution.

  • A display name for the custom basemap. This name appears in the Imagery tab of Site Viewer.

name = "opentopomap";
url = "${z}/${x}/${y}.png";
attribution = "©OpenStreetMap contributors";
displayName = "Open Topo Map";

Use addCustomBasemap to load the custom basemap, and then create a Site Viewer that uses the custom basemap.

viewer = siteviewer(Basemap=name);

Site Viewer with the OpenTopoMap basemap

After you add a custom basemap, the custom map is available in new Site Viewer windows. Note the Open Topo Map basemap icon in the Imagery tab.


A new Site Viewer. The Imagery tab shows a selection of basemaps, including the OpenTopoMap basemap..

Use removeCustomBasemap to remove the custom basemap. Then, open a new Site Viewer. Note the Open Topo Map basemap option is no longer available in the Imagery tab.


The Imagery tab in a new Site Viewer. The tab does not show the OpenTopoMap basemap.

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