Custom Geobasemap with ESRI map

9 次查看(过去 30 天)
Mia Hoffman
Mia Hoffman 2022-1-7
I am trying to add the Light Gray Canvas Base basemap from ESRI as a custom basemap using addCustomBasemap(). However, it is not accepting the URL from ESRI: https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer.
Here is a link to the actual basemap's documentation on ESRI: https://www.arcgis.com/home/item.html?id=291da5eab3a0412593b66d384379f89f. I understand that the map needs to be a tile server.
It is accepting an older URL to a similar map: 'https://server.arcgisonline.com/ArcGIS/rest/services/Canvas/World_Light_Gray_Base/MapServer/tile/{z}/{y}/{x}.jpg'
Any help would be appreciated.
Code looks like this:
url = 'https://basemaps.arcgis.com/ArcGIS/rest/services/World_Basemap_v2/MapServer/tile/{z}/{y}/{x}.jpg'; % URL of basemap
%%Specify a name for the basemap and attribution text to display with it.
name = 'lightgray'; % set variable name for basemap
att = 'Credit: Esri Basemaps'; % Set attribution for map
%% Finally, add the USGS Topo basemap.
addCustomBasemap(name,url,'Attribution',att); % create custom basemap

回答(1 个)

Kojiro Saito
Kojiro Saito 2022-1-11
The URL might be
url = 'https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/tile/${z}/${y}/${x}.pbf';
but as of R2021b, addCustomBasemap allows only raster tile maps.
The Vector Tile Server provided by ESRI is a vector tile map (.pbf format) and it's not supported.
I've informed developers of this question.

类别

Help CenterFile Exchange 中查找有关 Geographic Plots 的更多信息

产品


版本

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by