Main Content

Access Basemaps and Terrain in Site Viewer

Site Viewer displays data over basemaps and terrain. You can access different basemap and terrain choices in different ways.

MathWorks® offers a selection of basemaps, including two-tone maps created using Natural Earth, high-zoom-level maps hosted by Esri®, and a street map from OpenStreetMap®. For more information about basemap options, see the Basemap property of the siteviewer object.

Use Installed Basemap

The "darkwater" basemap is installed with MATLAB®. The other basemaps are not installed with MATLAB, but you can access them over an internet connection.

Download Basemaps

To work offline or to improve map responsiveness, you can download the basemaps created using Natural Earth onto your local system. The other basemaps are not available for download.

Download basemaps using the Add-On Explorer.

  1. On the MATLAB Home tab, in the Environment section, click Add-Ons > Get Add-Ons.

  2. In the Add-On Explorer, scroll to the MathWorks Optional Features section, and click Show All to find the basemap add-ons. You can also search for the basemap add-ons by name (listed in the following table) or click Optional Features in Filter by Type.

  3. Select the basemap add-ons that you want to download.

    Basemap NameBasemap Data Package Name
    "bluegreen"MATLAB Basemap Data - bluegreen
    "grayland"MATLAB Basemap Data - grayland
    "colorterrain"MATLAB Basemap Data - colorterrain
    "grayterrain"MATLAB Basemap Data - grayterrain
    "landcover"MATLAB Basemap Data - landcover

Add Custom Basemaps

Add custom basemaps from a URL by using the addCustomBasemap function. MATLAB requires an active internet connection to add and use custom basemaps from a URL.

If you have Mapping Toolbox™, you can also create custom basemaps from MBTiles files. MATLAB does not require internet access to add custom basemaps from MBTiles files. See addCustomBasemap (Mapping Toolbox) for more information.


If the basemap does not render correctly in Site Viewer (for example only the ocean is visible), check if the basemap server supports CORS (cross-origin resource sharing). Site Viewer does not support basemaps that do not support CORS.

Access Terrain

By default, Site Viewer uses terrain data hosted by MathWorks and derived from the GMTED2010 model by the USGS and NGA. You need an active internet connection to access this terrain data, and you cannot download it.

To work offline or to improve terrain responsiveness, add custom terrain from DTED files using the addCustomTerrain function. You do not need an active internet connection to add or use custom terrain.

Alternatively, you can set the Terrain property of the Site Viewer to "none".

See Also


Related Topics