Assembly: ESRI.ArcGISExplorer (in ESRI.ArcGISExplorer.dll) Version: 2.0.0.1500 (2.0.0.1500)
Syntax
Remarks
The Basemap contains one or more layers that are displayed as a single entity underneath all other layers in a map. The background layers provide context when working with other items in a map, such as layers and notes.
The Map.Basemap property allows you to access or change the maps current Basemap. To remove all background layers from the map set the property to nullNothingnullptra null reference (Nothing in Visual Basic).
ArcGIS Explorer comes preconfigured with basemaps for ArcGIS Online and Bing map services. You can use the GetBasemaps()()() method on the Application class to get a collection of all of the basemaps currently configured for the user. This method has superceded the Basemap.ArcGISOnline and Basemap.Bing classes, as it returns a collection based on the currently-available basemaps, which may be subject to change at any point.
The map has a ChildItems property that stores map content in a MapItemCollection. Although Basemap derives from MapItem, it cannot be added to a MapItemCollection like other MapItem types; doing so will result in an ArgumentException. The current Basemap is not contained in this collection.
Examples
// Retrieve the current Basemaps collection. System.Collections.ObjectModel.ReadOnlyCollection<Basemap> currentBasemaps = ESRI.ArcGISExplorer.Application.Application.GetBasemaps(); // Try finding Bing Hybrid basemap using the LINQ Contains method. // You will need an imports statement to the System.Linq namespace. var subset = from n in currentBasemaps where n.Name.Contains("Bing Maps Hybrid") select n; if ((subset != null) && (subset.Count() > 0)) { //Set the basemap property of the map to use the found Bing basemap Map map = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map; map.Basemap = subset.First(); }
' Retrieve the current Basemaps collection. Dim currentBasemaps As System.Collections.ObjectModel.ReadOnlyCollection(Of Basemap) = ESRI.ArcGISExplorer.Application.Application.GetBasemaps() ' Try finding Bing Hybrid basemap using the LINQ Contains method. ' You will need an imports statement to the System.Linq namespace. Dim subset = From n In currentBasemaps Where n.Name.Contains("Bing Maps Hybrid") Select n If ((Not subset Is Nothing) AndAlso (subset.Count() > 0)) Then 'Set the basemap property of the map to use the found Bing basemap Dim map As Map = ESRI.ArcGISExplorer.Application.Application.ActiveMapDisplay.Map map.Basemap = subset.First() End If