Main Content

Use Base Layers in Geographic Axes

Web maps, including functions such as webmap, wmmarker, and wmline, will be removed in a future release. Use geographic axes instead.

This topic provides strategies for using base layers (also called basemaps) in geographic axes. For some base layers, you can update your code by using a predefined basemap. For other base layers, you can update your code by using a custom basemap.

Benefits of Geographic Axes

Both web maps and geographic axes enable you to display custom basemaps created from raster map tiles. Unlike web maps, geographic axes also enable you to:

Add custom basemaps by using the addCustomBasemap function. After you add a custom basemap, you can display the basemap in a geographic axes object by using the geobasemap function. Alternatively, display the basemap by setting the Basemap property of the geographic axes object.

Replace Base Layers

This table lists the web map base layer options that are available in geographic axes as predefined basemaps. For a full list of predefined basemaps, see the basemap argument of the geobasemap function.

Base Layer (To Be Removed)Predefined Basemap (Recommended)

"World Street Map"

Use the "streets" basemap.

geobasemap streets

"World Imagery"

Use the "satellite" basemap.

geobasemap satellite

"Light Gray Canvas Map"

Use the "streets-light" basemap.

geobasemap streets-light

This table lists the base layer options that are not available in geographic axes as predefined basemaps. For these base layers, add a custom basemap by using the addCustomBasemap function with a map tiles URL and an attribution. You can optionally specify a display name, as well. For each base layer option, the table includes the map tiles URL, the attribution, and a display name.

Note

Custom basemaps added from map tile URLs depend on the stability of the URL. If a map tile URL becomes unavailable, then the custom basemap can be slow to display, partially display, or fail to display.

Base Layer (To Be Removed)Custom Basemap (Recommended)
"Open Street Map"

Add the custom basemap.

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

Use the custom basemap.

geobasemap openstreetmap

"World Topographic Map"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "World_Topo_Map/MapServer/tile/${z}/${y}/${x}.png";
attrib = "Sources: Esri, HERE, Garmin, Intermap, increment P Corp., " + ...
    "GEBCO, USGS, FAO, NPS, NRCAN, GeoBase, IGN, Kadaster NL, " + ...
    "Ordnance Survey, Esri Japan, METI, Esri China (Hong Kong), " + ...
    "(c) OpenStreetMap contributors, and the GIS User Community";
addCustomBasemap("worldtopomap",url,Attribution=attrib, ...
    DisplayName="World Topographic Map")

Use the custom basemap.

geobasemap worldtopomap

"World Shaded Relief"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "World_Shaded_Relief/MapServer/tile/${z}/${y}/${x}.png";
attrib = "Copyright:(c) 2014 Esri";
addCustomBasemap("worldshadedrelief",url,Attribution=attrib, ...
    DisplayName="World Shaded Relief")

Use the custom basemap.

geobasemap worldshadedrelief

"World Physical Map"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "World_Physical_Map/MapServer/tile/${z}/${y}/${x}.png";
attrib = "Source: US National Park Service";
addCustomBasemap("worldphysicalmap",url,Attribution=attrib, ...
    DisplayName="World Physical Map")

Use the custom basemap.

geobasemap worldphysicalmap

"World Terrain Base"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "World_Terrain_Base/MapServer/tile/${z}/${y}/${x}.png";
attrib = "Sources: Esri, USGS, NOAA";
addCustomBasemap("worldterrainbase",url,Attribution=attrib, ...    
    DisplayName="World Terrain Base")

Use the custom basemap.

geobasemap worldterrainbase

"USGS Imagery"

Add the custom basemap.

url = "https://basemap.nationalmap.gov/ArcGIS/rest/services/" + ...    
    "USGSImageryOnly/MapServer/tile/${z}/${y}/${x}/png";
attrib = "USDA, USGS The National Map: Orthoimagery.";
addCustomBasemap("usgsimagery",url,Attribution=attrib, ...
    DisplayName="USGS Imagery")

Use the custom basemap.

geobasemap usgsimagery

"USGS Topographic Imagery"

Add the custom basemap.

url = "https://basemap.nationalmap.gov/ArcGIS/rest/services/" + ...
    "USGSImageryTopo/MapServer/tile/${z}/${y}/${x}/png";
attrib = "USGS The National Map: Orthoimagery and US Topo.";
addCustomBasemap("usgsimagerytopo",url,Attribution=attrib, ...
    DisplayName="USGS Topographic Imagery")

Use the custom basemap.

geobasemap usgsimagerytopo

"USGS Shaded Topographic Map"

Add the custom basemap.

url = "https://basemap.nationalmap.gov/ArcGIS/rest/services/" + ...
    "USGSTopo/MapServer/tile/${z}/${y}/${x}/png";
attrib = "USGS The National Map: National Boundaries Dataset, " + ...
    "3DEP Elevation Program, Geographic Names Information System, " + ...
    "National Hydrography Dataset, National Land Cover Database, " + ...
    "National Structures Dataset, and National Transportation Dataset; " + ...
    "USGS Global Ecosystems; U.S. Census Bureau TIGER/Line data; " + ...
    "USFS Road data; Natural Earth Data; U.S. Department of State HIU; " + ...
    "NOAA National Centers for Environmental Information.";
addCustomBasemap("usgstopo",url,Attribution=attrib, ...
    DisplayName="USGS Shaded Topographic Map")

Use the custom basemap.

geobasemap usgstopo

"National Geographic Map"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "NatGeo_World_Map/MapServer/tile/${z}/${y}/${x}.png";
attrib = "National Geographic, Esri, Garmin, HERE, UNEP-WCMC, " + ...
    "USGS, NASA, ESA, METI, NRCAN, GEBCO, NOAA, increment P Corp.";
addCustomBasemap("natgeomap",url,Attribution=attrib, ...
    DisplayName="National Geographic Map")

Use the custom basemap.

geobasemap natgeomap

"Ocean Basemap"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "Ocean/World_Ocean_Base/MapServer/tile/${z}/${y}/${x}.png";
attrib = "Esri, Garmin, GEBCO, NOAA NGDC, and other contributors";
addCustomBasemap("oceanbasemap",url,Attribution=attrib, ...
    DisplayName="Ocean Basemap")

Use the custom basemap.

geobasemap oceanbasemap

"World Navigation Charts"

Add the custom basemap.

url = "https://server.arcgisonline.com/ArcGIS/rest/services/" + ...
    "Specialty/World_Navigation_Charts/MapServer/tile/${z}/${y}/${x}.png";
attrib = "Copyright:(c) 2013 East View Cartographic";
addCustomBasemap("worldnavcharts",url,Attribution=attrib, ...
    DisplayName="World Navigation Charts")

Use the custom basemap.

geobasemap worldnavcharts

Interactively Select Basemaps

By default, geographic axes do not include interactive controls for selecting a basemap. For an example that shows how to add a basemap picker to a geographic axes object, see Add Interactive Controls to Geographic Axes.

See Also

Functions

Properties

Topics