Click or drag to resize
Map Class
The map contains layers and additional properties and can be displayed in a MapView.
Inheritance Hierarchy

Namespace: Esri.ArcGISRuntime.Controls
Assembly: Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 10.2.7.0 (10.2.7.1234)
Syntax
[ContentPropertyAttribute("Layers")]
public class Map : DependencyObject

The Map type exposes the following members.

Constructors
  NameDescription
Public methodMap
Constructs an empty map
Top
Methods
  NameDescription
Public methodCheckAccess
Determines whether the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Public methodClearValue(DependencyProperty)
Clears the local value of a property. The property to be cleared is specified by a DependencyProperty identifier.
(Inherited from DependencyObject.)
Public methodClearValue(DependencyPropertyKey)
Clears the local value of a read-only property. The property to be cleared is specified by a DependencyPropertyKey.
(Inherited from DependencyObject.)
Public methodCoerceValue
Coerces the value of the specified dependency property. This is accomplished by invoking any CoerceValueCallback function specified in property metadata for the dependency property as it exists on the calling DependencyObject.
(Inherited from DependencyObject.)
Public methodEquals
Determines whether a provided DependencyObject is equivalent to the current DependencyObject.
(Inherited from DependencyObject.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Gets a hash code for this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetLocalValueEnumerator
Creates a specialized enumerator for determining which dependency properties have locally set values on this DependencyObject.
(Inherited from DependencyObject.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodGetValue
Returns the current effective value of a dependency property on this instance of a DependencyObject.
(Inherited from DependencyObject.)
Public methodInvalidateProperty
Re-evaluates the effective value for the specified dependency property
(Inherited from DependencyObject.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Protected methodOnPropertyChanged
Invoked whenever the effective value of any dependency property on this DependencyObject has been updated. The specific dependency property that changed is reported in the event data.
(Inherited from DependencyObject.)
Public methodReadLocalValue
Returns the local value of a dependency property, if it exists.
(Inherited from DependencyObject.)
Public methodSetCurrentValue
Sets the value of a dependency property without changing its value source.
(Inherited from DependencyObject.)
Public methodSetValue(DependencyProperty, Object)
Sets the local value of a dependency property, specified by its dependency property identifier.
(Inherited from DependencyObject.)
Public methodSetValue(DependencyPropertyKey, Object)
Sets the local value of a read-only dependency property, specified by the DependencyPropertyKey identifier of the dependency property.
(Inherited from DependencyObject.)
Protected methodShouldSerializeProperty
Returns a value that indicates whether serialization processes should serialize the value for the provided dependency property.
(Inherited from DependencyObject.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Public methodVerifyAccess
Enforces that the calling thread has access to this DispatcherObject.
(Inherited from DispatcherObject.)
Top
Fields
  NameDescription
Public fieldStatic memberInitialViewpointProperty
Identifies the InitialViewpoint dependency property.
Public fieldStatic memberLayersProperty
Identifies the Layers dependency property
Public fieldStatic memberSpatialReferenceProperty
Identifies the SpatialReference dependency property.
Top
Properties
  NameDescription
Public propertyDependencyObjectType
Gets the DependencyObjectType that wraps the CLR type of this instance. 
(Inherited from DependencyObject.)
Public propertyDispatcher
Gets the Dispatcher this DispatcherObject is associated with.
(Inherited from DispatcherObject.)
Public propertyCode exampleInitialViewpoint
Gets or sets the extent the map should start up at.
Public propertyIsSealed
Gets a value that indicates whether this instance is currently sealed (read-only).
(Inherited from DependencyObject.)
Public propertyLayers
Gets or sets the LayerCollection of Layer objects in the Map Control.
Public propertySpatialReference
Gets or sets the spatial reference for the map
Top
See Also
Supported Platforms
This type is supported on the following ArcGIS Runtime .NET SDK platforms:
Windows Desktop
Windows Phone
Windows Store
Additional Examples
Hyperlink to ExampleDescription
AllLayersServiceInfo_FeatureServiceLayerInfoDemonstrates getting detailed ArcGIS Server MapServer metadata for various ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer web services.
ArcGISDynamicMapServiceLayerShows creating an ArcGISDynamicMapServiceLayer in XAML and defining the serviceUri property for the layer.
ArcGISDynamicMapServiceLayer_GetDetailsShows adding an ArcGISDynamicMapServiceLayer with a LayerDefinition applied (discovered by the ArcGISDynamicMapServiceLayer.GetDetailsAsync Method) and then modifying the LayerDefinition to change the features returned.
ArcGISDynamicMapServiceLayer_VisibleLayersShows obtaining which sub-layers are visible using the ArcGISDynamicMapServiceLayer.GetAllDetailsAsync Method. Then the user can interact with application and change the VisibleLayers of the ArcGISDynamicMapServiceLayer.
ArcGISDynamicMapServiceLayerImageFormatShows changing the return ImageFormat for ArcGISDynamicMapServiceLayer and how that appears visually in the Map.
ArcGISDynamicMapServiceLayerXamlAndCodeBehindShows creating an ArcGISDynamicMapServiceLayer in XAML and via code-behind. The ArcGISDynamicMapServiceLayer.InitializeAsync Method is used to obtain metadata about the layer (i.e. ID and Copyright) using the Async/Task framework.
ArcGISImageServiceLayerWindowShows creating an ArcGIS Image Service Layer and applying rendering rules.
ArcGISImageServiceLayerXamlAndCodeBehindShows adding an ArcGISImageServiceLayer via XAML and code-behind. The ArcGISImageServiceLayer.InitializeAsync Method is used to obtain metadata about the layer (i.e. ID and Description) using the Async/Task framework.
BaseMapsDemonstrates switching out various BaseMap (via ArcGISTiledMapServiceLayer) layers served up by ArcGIS Online.
BingLayer_AdvancedTeaches one method (advanced) for using the Microsoft WebClient and a DataContract to poll a Microsoft Bing development server to determine if a Bing Key is correct and then loading multiple BingLayer's into the Map and allowing the user to switch between various BingLayer.MapStyles.
CreateDynamicLayerInfosFromLayerInfosDemonstrates applying a custom rendering via XAML using the Dynamic Layer option of an ArcGISDynamicMapServiceLayer. Also, shows how to use the ArcGISDynamicMapServiceLayer.CreateDynamicLayerInfosFromLayerInfos Method to obtain the original rendering of the layer that was defined in the map service. The CreateDynamicLayerInfosFromLayerInfos is then used to reset the layer back to orignal rendering.
CSVLayerXamlDemonstrates defining a CsvLayer in XAML and setting the serviceUri property to a text file hosted online by the United States Geological Survey (USGS).
DynamicLayerInfoCollectionDemonstrates using various Renderers on a Dynamic Layer when the 'WorkspaceID' and 'DataSourceName' are known using a TableDataSource.
DynamicLayerInfosDemonstrates using various Renderers on a Dynamic Layer (via XAML and code-behind) when the 'WorkspaceID' and 'DataSourceName' are known using a TableDataSource.
Editor_SketchingDemonstrates sketching various geometric shapes on the map via the Editor.RequestShapeAsync method. The sketches are then added as Graphics in a GraphicsLayer and drawn on the map.
EditorConfigurationDemonstrates sketching Polyline shapes on the map via the Editor.RequestShapeAsync method. The sketches are then added as Graphics in a GraphicsLayer and drawn on the map. Multiple versions of customizing the symbology of the Editor are shown.
EqualGeometriesDemonstrates the differences in comparing a few polygon geometries to via the Geometry.IsEqual and GeometryEngine.Equals Methods.
FeatureLayer_IdentifyDemonstrates performing and Identify on a FeatureLayer. The FeatureLayer.HitTestAsync method is used to select (and highlight) the feature a user clicks/taps on as well as display specific attributes for that feature.
FeatureLayer_LabelingDemonstrates labeling highway names in a FeatureLayer.
FeatureLayer_SelectFeaturesByRectangleDemonstrates selecting features in a FeatureLayer by dragging a rectangle across the map. Features are then highlighted in the FeatureLayer and their selected ID values are displayed in a Listbox.
FeatureLayer_SetFeatureVisibleDemonstrates being able to turn off the visibility of a feature in a FeatureLayer by tapping on it.
FeatureLayerViaGeodatabaseDemonstrates creating a FeatureLayer from a GeodatabaseFeatureTable in an ArcGIS Runtime provisioned Geodatabase that is stored locally on disk.
FeatureLayerViaGeodatabaseWebDownloadDemonstrates downloading a Geodatabase on ArcGIS Server to the local disk and then creating a FeatureLayer from a GeodatabaseFeatureTable in the downloaded Geodatabase.
FeatureLayerViaShapefileDemonstrates creating a FeatureLayer from a ShapefileTable that is stored locally on disk.
FeatureLayerXamlAndCodeBehindShows creating a FeatureLayer in XAML and via code-behind. The FeatureLayer.InitializeAsync Method is used to obtain metadata about the layer (i.e. ID and Copyright) using the Async/Task framework.
FeatureServiceLayerInfo_CopyrightTextDemonstrates using the GetDetailsAsync Method to obtain the FeatureServiceLayerInfo.CopyrightText on an ArcGISDynamicMapServiceLayer.
FindTaskDemonstrates using the Query.FindTask operation to search for text in attribute fields of an ArcGIS Server map service and display the features found as graphics in a GraphicsLayer.
GeocodeFullAddressInputDemonstrates performing a geocode by submitting values for multiple address fields.
GeocodeSingleLineInputPerforms a single line geocode using either an online ArcGIS Locator service or a local Locator.
GeometryEngine_BufferDemonstrates using the powerful GeometryEngine local process to generate graphic buffer polygons based upon a user specified radius and mouse-clicks/taps on the map.
GeometryEngine_BufferWithUnionDemonstrates using the powerful GeometryEngine local process to generate a single graphic buffer (unioned) based upon multiple points provided by user interaction with the map.
GeometryEngine_ConvexHullDemonstrates using the powerful GeometryEngine local process to generate a convex hull graphic polygon based upon user specified mouse-clicks/taps on the map.
GeometryEngine_Difference_Intersection_UnionDemonstrates using the powerful GeometryEngine local process to perform the spatial analysis operations of Difference, Intersection, and Union on two input geometries.
GeometryEngine_TestingSpatialRelationshipsDemonstrates using the powerful GeometryEngine local process to test various spatial relationships (Contains, Crosses, Disjoint, Equals, Intersects, Overlaps, Touches, Within) between two input geometries.
GeoRSSLayerWindowCreates a GeoRssLayer based on the United States Geological Survey earthquake feed and assigned a SimpleRenderer.
GetAreaAllows the user to draw a polygon on the map and calculate the area via several methods.
GraphicsLayer_LabelingDemonstrates labeling city names where two AttributeLabelClass'es are used (one for smaller cities and one for larger ones).
GraphicsLayer_RenderingModeDemonstrates setting the various GraphicsLayer.RenderingMode options and their effect on TextSymbols when the MapView is rotated.
GraphicsLayerWindowDemonstrates various Graphics and GraphicsLayer related actions.
GraphicsOverlayDemonstrates using the Query.FindTask operation to return county features in an ArcGIS Server map service and display the features found as Graphics in a GraphicsOverlay. The user can perform a MapViewTapped on the Graphics to perform a GraphicsOverlay.HitTestAsync to select features and display attribute information.
IdentifyParameter_DynamicLayerInfosDemonstrates performing an Identify on a Dynamic Layer using the ESRI.ArcGISRuntime.Tasks.Query.IdentifyParameter.DynamicLayerInfos Property.
IdentifyTaskDemonstrates using the Query.IdentifyTask operation find a feature based upon it's geographic position in an ArcGIS Server map service and display it as a graphic in a GraphicsLayer.
InitialMapExtentCodeShows how to set the initial extent of the map (Map.InitialExtent) in code.
InitialMapExtentXamlShows how to set the initial extent of the map (Map.InitialExtent) in XAML.
LayerCollectionDemonstrates the work-flow of creating a layer dynamically via code-behind. The process of a layer: (1) initializing, (2) determining when initialization is complete, and (3) error trapping for bad initialization is described in detail.
LayerDefinitionsDemonstrates setting numerous LayerDefinitions values on an ArcGISDynamicMapServiceLayer and visualizing the impact of the features being returned in the Map.
LayerDefinitionsSimpleDemonstrates setting the LayerDefinitions Property of an ArcGISDynamicMapServiceLayer where two sub-layers are present. One sub-layer has the LayerDefinition set in XAML and the other sub-layer has it's LayerDefinition set via code-behind.
LayerDrawingOptionCollectionDemonstrates using the existing rendering of a Dynamic Layer sub-layer of an ArcGISDynamicMapServiceLayer and switching to a custom rendering defined in code-behind for the Dynamic Layer.
LayerDrawingOptionsDemonstrates changing the rendering of the first sub-layer of an ArcGISDynamicMapServiceLayer using the Dynamic Layer capabilities of ArcGIS Server 10.1 and higher.
LayersInitializedDemonstrates implementing logic which is dependent on the layer collection being initialized.
MapServiceInfo_DocumentInfo_LayerServiceInfoDemonstrates getting detailed ArcGIS Server MapServer metadata to obtain MapServiceInfo data for various ArcGISDynamicMapServiceLayer and ArcGISTiledMapServiceLayer web services.
MapView_DragDropEventsDemonstrates creating a CsvLayer by performing a Drag-and-Drop from a file on the local disk in File Explorer to the MapView.
Mapview_LayerLoadedDemonstrates how to determine if a particular layer has loaded via the MapView.LayerLoaded Event.
MapView_LayersLoadedAsyncDemonstrates how to determine if a particular layer has loaded via the MapView.MapView_LayersLoadedAsync Method.
MapView_OverlaysDemonstrates displaying a UIElement on top of the MapView using the MapView.Overlays Property. This is useful for performing MapTip functionality.
MapView_SetViewDemonstrates using the various MapView.SetView Methods to adjust the extent of the map.
MapView_SpatialReferenceDemonstrates reseting the MapView.SpatialReference by setting it to a new Map.
MultipleMapsInMapViewDemonstrates switching out different Map objects (with different layers) for the MapView.Map Property.
OpenStreetMapLayerWindowDemonstrates adding an OpenStreetMap Layer to the Map in XAML.
PictureFillSymbolDemonstrates the using a SimpleRenderer with options for PictureFillSymbol.
PictureMarkerSymbolDemonstrates the using a SimpleRenderer with options for SimpleMarkerSymbol, PictureMarkerSymbol, and TextMarkerSymbol.
PolygonBuilder_MakeIslandsShows how to use the PolygonBuilder to turn multiple independent Polygons into a single Polygon (use case: grouping island Polygons together into one record).
PolygonFromScratchDemonstrates creating a simple polygon, donut polygon, and multiple ring polygon via code-behind. An option to view coordinate information for each vertex in the polygons is provided.
ProximityResultDemonstrates identifying the nearest vertex and nearest coordinate in a polyline to a user clicked point in the map via ProximityResult.
QueryTableDataSourceDemonstrates adding a Dynamic Layer via code-behind using a QueryTableDataSource.
RoutingPointToPointDemonstrates simple point to point routing between two input locations.
RoutingWithBarriersShows routing and re-routing around user defined point, polyline, and polygon barriers.
RoutingWithDirectionsInteraction logic for RoutingWithDirections.xaml
SmoothGraphicAnimationAnimates a graphic smoothly between two user defined locations by calling the MapPoint.MoveTo method at regular intervals as defined by a DispatcherTimer. The distance the point is moved each time is calculated by a quintic easing function.
WMTSLayerWindowDemonstrates adding a WMTS layer to the Map in XAML.