Class Basemap
Represents the basemap, which holds layers that provide a geographic context and a visual backdrop for operational data. Layers in a basemap can supply imagery, place names, administrative boundaries, and elevation data.
Inheritance
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Basemap : INotifyPropertyChanged, IApiKeyResource, ILoadable
Remarks
A basemap provides a background of geographical context for the content you display in a map or scene. It provides a visual reference to help orient users and a framework on which you can overlay operational layers, perform analysis, and visualize geographic information. The content of a basemap is typically static and does not change frequently.
A basemap is composed of a collection of base layers (BaseLayers) and reference layers (ReferenceLayers). Base layers are displayed at the bottom of a map or scene, and reference layers are displayed at the top, with the OperationalLayers between them.
Typically, you construct a basemap using a basemap style:
- Use image tile basemap styles for satellite imagery and hillshade.
- Use vector tile basemap styles such as streets navigation, light gray canvas, and OpenStreetMap (OSM).
- Create custom basemap styles with your own colors, glyphs, and fonts using the ArcGIS Vector Tile Style Editor.
See BasemapStyle for the full range of the basemap styles provided by Esri. Basemap styles allow you to take advantage of geographically load-balanced services and monitor usage with API keys or authenticated users. See Basemap layers) for more information.
If your app works offline, you can construct a local basemap from a tiled layer using a TileCache, such as a tile package (.tpk, .tpkx, .vtpk) or a compact cache, stored on the device.
Constructors
Name | Description |
---|---|
Basemap() | Initializes a new instance of the Basemap class. Layers need to be added to the basemap before it can be used. |
Basemap(BasemapStyle) | Initializes a new instance of the Basemap class with a BasemapStyle. These basemaps are secured and access requires either an API key or an authenticated user. |
Basemap(BasemapStyle, BasemapStyleParameters) | Initializes a new instance of the Basemap class with a BasemapStyle and additional parameters to control settings like language. |
Basemap(Layer) | Initializes a new instance of the Basemap class with the specified layer. |
Basemap(Item) | Initializes a new instance of the Basemap class with a portal item of type WebMap. |
Basemap(IEnumerable<Layer>, IEnumerable<Layer>) | Initializes a new instance of the Basemap class with a set of base and reference layers. |
Basemap(Uri) | Initializes a new instance of the Basemap class with a Uri to a portal item which is a web base map. |
Properties
Name | Description |
---|---|
ApiKey | Gets or sets the API key that allows your app to access ArcGIS location services and private portal items. |
BaseLayers | Gets or sets the base layers of the base map. |
Item | Gets the portal item associated with this basemap. |
LoadError | Gets the load error for this instance - if any. |
LoadStatus | Gets the load status of the instance. |
Name | Gets or sets the name of the base map. |
ReferenceLayers | Gets or sets the reference layers displayed in this basemap. |
Uri | Gets the basemap's uri origin. |
Methods
Name | Description |
---|---|
CancelLoad() | Cancels an ongoing load. |
Clone() | Clones this instance of Basemap and its members. |
FromJson(String) | Creates a base map from the json. |
LoadAsync() | Initiates loading of a basemap |
LoadFromUriAsync(Uri) | Load a base map from a uri resource |
RetryLoadAsync() | Retry loading metadata for the instance in case of a load error. |
ToJson() | Serializes the base map to json. |
Events
Name | Description |
---|---|
Loaded | Occurs when this instance is loaded. |
LoadStatusChanged | Occurs when the instance's LoadStatus has changed. |
PropertyChanged | Occurs when a property value changes. |
Applies to
Target | Versions |
---|---|
.NET Standard 2.0 | 100.3 - 200.5 |
.NET | 100.13 - 200.5 |
.NET Windows | 100.13 - 200.5 |
.NET Android | 200.0 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.0 - 200.5 |
Xamarin.Android | 100.0 - 100.15 |
Xamarin.iOS | 100.0 - 100.15 |
UWP | 100.0 - 200.5 |