Show / Hide Table of Contents

Class Map

A map is a container for layers. Use a map together with a map view to display layers of geographic data in 2D.

Inheritance
Object
GeoModel
Map
Implements
INotifyPropertyChanged
ILoadable
GeoModel.AllLayers
GeoModel.Basemap
GeoModel.Bookmarks
GeoModel.InitialViewpoint
GeoModel.Item
GeoModel.LoadSettings
GeoModel.OperationalLayers
GeoModel.SpatialReference
GeoModel.Tables
GeoModel.TransportationNetworks
GeoModel.Version
GeoModel.FloorDefinition
GeoModel.FloorManager
GeoModel.GeotriggersInfo
GeoModel.LoadAsync()
GeoModel.RetryLoadAsync()
GeoModel.LoadStatus
GeoModel.LoadError
GeoModel.CancelLoad()
GeoModel.Loaded
GeoModel.LoadStatusChanged
GeoModel.PropertyChanged
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
Object.ToString()
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Map : GeoModel, INotifyPropertyChanged, ILoadable
Remarks

The map contains layers of mapping data and information such as basemaps, popups, renderers, and labels which define the map's capabilities. You can access the map content directly or visualize the map in a map view.

In an MVC architecture, the map represents the model and map view represents the view. The map specifies how the geographic data is organized, and the map view renders the data on the screen and allows users to interact with it.

A map can contain a basemap and one or more operational layers:

  • A basemap helps orient the user of the map. Typically it sits behind operational layers and shows roads and parcel boundaries to give context to operational layers. Basemaps can also contain layers which are drawn over the top operational layers such as label layers.
  • An operational layer provides content that is of unique interest to the app and the task at hand, such as data about earthquakes, traffic, or weather. Its content might change frequently.

You can create a map from an existing web map using its URL or PortalItem. Alternatively, you can get a map directly from a Maps collection. The map properties will be hydrated when the map is loaded.

If you create a new map, the spatial reference of the first layer you add, which is typically the first layer in the Basemap, defines the spatial reference of the entire map.

See Maps 2D for more information about maps.

Constructors

Name Description
Map()

Initializes a new instance of the Map class.

Map(SpatialReference)

Initializes a new instance of the Map class with a specified spatial reference.

Map(Basemap)

Initializes a new instance of the Map class with a Basemap.

Map(BasemapStyle)

Initializes a new instance of the Map class with a BasemapStyle.

Map(Item)

Initializes a new instance of the Map class with a portal item of type WebMap.

Map(Uri)

Initializes a new instance of the Map class with a Uri to a web map.

Properties

Name Description
BackgroundColor

Gets or sets the background color of the map.

MaxExtent

Gets or sets the extent that constrains the display to a specific region.

MaxScale

Gets or sets the maximum scale for the map.

MinScale

Gets or sets the minimum scale for the map.

OfflineSettings

Gets offline settings configured by the author of an online web map (if appropriate).

ReferenceScale

Gets or sets the reference scale for the map.

UnknownJson

Gets the unknown JSON from the web map source JSON in a dictionary of JSON strings. This data will be lost if the web map gets saved back to JSON.

UnsupportedJson

Gets the unsupported data from the web map source JSON from the web map source JSON in a dictionary of JSON strings. This data will be persisted in the document.

Uri

Gets the Uri for the map.

UtilityNetworks

Gets the list of UtilityNetwork in the map.

Methods

Name Description
Clone()

Clones this instance of the map and its members.

FromJson(String)

Creates a map from specified JSON.

GetNamedTraceConfigurationsFromUtilityNetworkAsync(UtilityNetwork)

Asynchronously retrieves a list of all UtilityNamedTraceConfiguration objects referenced by the UtilityNetwork's map.

GetNamedTraceConfigurationsFromUtilityNetworkAsync(UtilityNetwork, CancellationToken)

Asynchronously retrieves a list of all UtilityNamedTraceConfiguration objects referenced by this map for the specified utility network.

LoadFromUriAsync(Uri)

Creates a map from a Uri to a web map and loads it.

SaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerable<String>, RuntimeImage, Boolean)

Save the map to a new PortalItem.

SaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerable<String>, RuntimeImage, Boolean, CancellationToken)

Save the map to a new PortalItem.

SaveAsync(Boolean)

Saves any changes that have been made to the map to the associated PortalItem.

SaveAsync(Boolean, CancellationToken)

Save any changes that have been made to the map to the associated PortalItem.

ToJson()

Converts a map into an ArcGIS JSON representation.

See Also

OperationalLayers
Basemap

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 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.
Add graphics with symbols: Use a symbol style to display a graphic on a graphics overlay.
In This Article
Back to top Copyright © 2022 Esri.