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.
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
[CreateFromString(MethodName = "Esri.ArcGISRuntime.CreateFromStringHelpers.CreateMapFromStringUrl")]
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) | |
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. |
IndoorPositioningDefinition | Gets the information needed to create an IndoorsLocationDataSource. |
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
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 |