Show / Hide Table of Contents

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
Object
Basemap
Implements
INotifyPropertyChanged
IApiKeyResource
ILoadable
Object.ToString()
Object.Equals(Object)
Object.Equals(Object, Object)
Object.ReferenceEquals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
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 named 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 a named user.

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 to access API key enabled services and resources in ArcGIS Online.

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

TargetVersions
.NET Standard 2.0100.3 - 200.2
.NET 6.0100.13 - 200.2
.NET 6.0 Windows100.13 - 200.2
.NET 6.0 Android200.0 - 200.2
.NET 6.0 iOS200.0 - 200.2
.NET Framework100.0 - 200.2
.NET 5100.10 - 100.12
.NET Core 3.1100.7 - 100.12
Android100.0 - 100.15
iOS100.0 - 100.15
UWP100.0 - 200.2

Relevant samples

Access load status: Determine the map's load status which can be `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.
Add an integrated mesh layer: View an integrated mesh layer from a scene service.
Add ENC exchange set: Display nautical charts per the ENC specification.
Create, delete, and update features: Add, delete, and update features (geometry and attributes) in a feature layer.
In This Article
Back to top Copyright © 2022 Esri.