Custom maps e.g. Esri etc. using geobasemap and addCustomBasemap
16 views (last 30 days)
Show older comments
I am interested in the geobasemap function, however it would be great to be able to test all the maps that are out there using the addCustomBasemap or whatever other method is necessary…
There is a good list of maps here:
For instance, I am interested in how I can bring in the CartoDB, Jawg, or even additional ESRI maps within the Matlab Mapping Toolbox.
Thanks for your help
0 Comments
Answers (1)
Varun
on 30 Aug 2023
Edited: Varun
on 12 Sep 2023
Hello!
I understand that you wish to import custom basemaps to MATLAB Mapping Toolbox. Support for vector basemaps hosted by ESRI has been added to the “addCustomBasemap” function in R2023a.
Vector basemaps can be added to MATLAB like this:
basemapName1 = "worldstreetstyle";
url = "https://basemaps.arcgis.com/arcgis/rest/services/World_Basemap_v2/VectorTileServer/tile/${z}/${x}/${y}.pbf";
style = "https://www.arcgis.com/sharing/rest/content/items/de26a3cf4cc9451298ea173c4b324736/resources/styles/root.json?f=pjson";
addCustomBasemap(basemapName1,url,Style=style)
lat = [42.3501];
lon = [-71.0870];
gb = geobubble(lat,lon,"Basemap",basemapName1);
You may refer to the following documentation to learn more about addCustomBasemap: https://www.mathworks.com/help/map/ref/addcustombasemap.html#mw_2f5f761b-f766-4575-8754-b08999c3192e
Please note that importing ESRI basemaps is a relatively new feature, having just been introduced in R2023a.
Hope this helps!
Thanks,
Varun
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!