ChangeBasemapSample (7/31): Consume a webmap from ArcGIS Online and have
the ability to switch basemaps.
In AGSWebMap class, switchBaseMapOnMapView method takes AGSWebMapBaseMap
object as a single parameter. AGSWebMapBaseMap is a class that represents
the basemap layer(s) of a webmap. You can create an instance of
AGSWebMapBaseMap class by using initWithJSON method. For more information
about webmap JSON format, please visit this URL:
http://resources.arcgis.com/en/help/arcgis-rest-api/index.html#//02r30000004n000000. When you pass AGSWebMapBaseMap object (new basemap for the webmap) as an
argument in switchBaseMapOnMapView and call the method, you will be able
to switch the basemap of your webmap. The AGSWebmap class adheres to
<AGSWebmapDelegate> protocol. You could implements methods in
<AGSWebmapDelegate> in order to respond to events such as failure to load
basemap layer and failure to load a layer.