MATLAB: Add Google Maps to default basemap.

addcustombasemapgoogle maps api keymappingMapping Toolbox

Hello, I have the Mapping toolbox and a Google API key. How do I add Google as a basemap? It is not clear from the addCustombasemap documentation.

Best Answer

In addCustomBasemap(basemapName,URL) the parameter basemapname refers to the name that you will use to specify your custom basemap. ‘URL’ specifies the website that provides the map data.
For example
name = 'opentopomap';
url = 'a.tile.opentopomap.org';
addCustomBasemap(name,url)
Adds the custom basemap 'opentopomap' to the list of basemaps for use with mapping functions. Now you could use this basemap with mapping functions
Related Question