Loading Base map needs token?

523
2
10-03-2023 04:18 AM
YashvitNaik
New Contributor III

Hi, while loading base map on xamarin iOS (Esri.ArcGISRuntime 100.15.1),  I am getting an error saying token required.
How can i load base map without token? 

0 Kudos
2 Replies
dotMorten_esri
Esri Notable Contributor

How can i load base map without token? 

It really depends on which service you're putting in your basemap. If you're using the ArcGIS Online basemap services they generally require an API Key to load. You can generate one in the developer dashboard. Otherwise look for other various other services you can use that aren't requiring API key.

ThadTilton
Esri Contributor

You can use any web map as your basemap, so if you find a public one (or create one yourself) you can use code like this without providing an API key:

// Create a new Map with the 'World Globe 1812' web map as the base map.
var webMapItemUrl = "https://www.arcgis.com/home/item.html?id=ef5920f160bd4239bdeb1348de3a3156";
var basemap = new Basemap(new System.Uri(webMapItemUrl));

Map myMap = new Map(basemap);

 

0 Kudos