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.Mapping
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
public class Map : INotifyPropertyChanged, ILoadable

The Map type exposes the following members.

Public methodCode exampleMap
Initializes a new instance of the Map class.
Public methodCode exampleMap(Uri)
Initializes a new instance of the Map class with a Uri to a web map.
Public methodCode exampleMap(Basemap)
Initializes a new instance of the Map class with a Basemap.
Public methodCode exampleMap(BasemapStyle)
Initializes a new instance of the Map class with a BasemapStyle.
Public methodCode exampleMap(Item)
Initializes a new instance of the Map class with an ArcGIS Item.
Public methodCode exampleMap(SpatialReference)
Initializes a new instance of the Map class with a specified spatial reference.
Public methodCode exampleMap(BasemapType, Double, Double, Int32)
Initializes a new instance of the Map class with a Basemap and an initial viewpoint.
Public propertyAllLayers
Gets all layers in the order they are rendered (bottom-most first).
Public propertyBackgroundColor
Gets or sets the background color of the map.
Public propertyCode exampleBasemap
Gets or sets the basemap for the Map
Public propertyCode exampleBookmarks
Gets the collection of bookmarks in the map.
Public propertyCode exampleInitialViewpoint
Gets or sets the viewpoint where the map should start up at.
Public propertyCode exampleItem
Gets the ArcGIS Item for the map.
Public propertyCode exampleLoadError
Gets the load error for this instance - if any.
Public propertyLoadSettings
Gets or sets the load settings for a map. The load settings class contains a set of properties which control different options which are applied as the map is loaded.
Public propertyLoadStatus
Gets the current load status of the map.
Public propertyCode exampleMaxScale
Gets or sets the maximum scale for the map.
Public propertyCode exampleMinScale
Gets or sets the minimum scale for the map.
Public propertyOfflineSettings
Gets offline settings configured by the author of an online web map (if appropriate).
Public propertyCode exampleOperationalLayers
Gets or sets the collection of operational layers in the map.
Public propertyReferenceScale
Gets or sets the reference scale for the map.
Public propertyCode exampleSpatialReference
Gets the spatial reference for the map
Public propertyTables
Gets the list of tables in the map.
Public propertyCode exampleTransportationNetworks
Gets the maps transportation networks.
Public propertyUnknownJson
Gets the unknown JSON from the webmap source JSON in a dictionary of JSON strings. This data will be lost if the webmap gets saved back to JSON.
Public propertyUnsupportedJson
Gets the unsupported data from the webmap source JSON from the webmap source JSON in a dictionary of JSON strings. This data will be persisted in the document.
Public propertyUri
Gets the Uri for the map.
Public propertyUtilityNetworks
Gets the list of UtilityNetwork in the map.
Public propertyVersion
Gets the version for the map when this was authored.
Public methodCancelLoad
Cancels an ongoing load.
Public methodClone
Clones this instance of the map and its members.
Public methodStatic memberFromJson
Creates a map from specified JSON.
Public methodGetNamedTraceConfigurationsFromUtilityNetworkAsync
Asynchronously retrieves a list of all UtilityNamedTraceConfiguration objects referenced by this map for the specified utility network.
Public methodCode exampleLoadAsync
Initiates loading of a map
Public methodStatic memberLoadFromUriAsync
Creates a map from a Uri to a webmap and loads it.
Public methodRetryLoadAsync
Retries the load operation in case of a load error.
Public methodCode exampleSaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerableString, RuntimeImage, Boolean)
Save the map to a new PortalItem.
Public methodSaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerableString, Uri, Boolean) Obsolete.
Save the map to a new PortalItem.
Public methodSaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerableString, RuntimeImage, Boolean, CancellationToken)
Save the map to a new PortalItem.
Public methodSaveAsAsync(ArcGISPortal, PortalFolder, String, String, IEnumerableString, Uri, Boolean, CancellationToken) Obsolete.
Save the map to a new PortalItem.
Public methodCode exampleSaveAsync(Boolean)
Saves any changes that have been made to the map to the associated PortalItem.
Public methodSaveAsync(Boolean, CancellationToken)
Save any changes that have been made to the map to the associated PortalItem.
Public methodToJson
Converts a map into an ArcGIS JSON representation.
Public eventLoaded
Occurs when this instance is loaded.
Public eventCode exampleLoadStatusChanged
Occurs when the instance's LoadStatus has changed.
Public eventPropertyChanged
Occurs when a property value changes.


Example Name: DisplayMap

Display a map with an imagery basemap.

Code example screen shot.

// Copyright 2016 Esri.
// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License.
// You may obtain a copy of the License at:
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an 
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific 
// language governing permissions and limitations under the License.

using Esri.ArcGISRuntime.Mapping;

namespace ArcGISRuntime.WPF.Samples.DisplayMap
        name: "Display map",
        category: "Map",
        description: "Display a map with an imagery basemap.",
        instructions: "Run the sample to view the map. Pan and zoom to navigate the map.",
        tags: new[] { "basemap", "map" })]
    public partial class DisplayMap
        public DisplayMap()

            // Create the UI, setup the control references and execute initialization 

        private void Initialize()
            // Create new Map with basemap
            Map myMap = new Map(BasemapStyle.ArcGISImageryStandard);

            // Assign the map to the MapView
            MyMapView.Map = myMap;
<UserControl x:Class="ArcGISRuntime.WPF.Samples.DisplayMap.DisplayMap"
             d:DesignHeight="300" d:DesignWidth="300">
        <esri:MapView x:Name="MyMapView"/>
See Also
Additional Examples
Hyperlink to ExampleDescription
AccessLoadStatusDetermine the map's load status which can be: `NotLoaded`, `FailedToLoad`, `Loading`, `Loaded`.
AddEncExchangeSetDisplay nautical charts per the ENC specification.
AddFeaturesAdd features to a feature layer.
AddGraphicsRendererA renderer allows you to change the style of all graphics in a graphics overlay by referencing a single symbol style.
AddGraphicsWithSymbolsUse a symbol style to display a graphic on a graphics overlay.
AnalyzeHotspotsUse a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.
AnalyzeViewshedCalculate a viewshed using a geoprocessing service, in this case showing what parts of a landscape are visible from points on mountainous terrain.
Animate3DGraphicAn `OrbitGeoElementCameraController` follows a graphic while the graphic's position and rotation are animated.
ApplyMosaicRuleApply mosaic rule to a mosaic dataset of rasters.
ApplyScheduledUpdatesApply scheduled updates to a downloaded preplanned map area.
ArcGISMapImageLayerUrlAdd an ArcGIS Map Image Layer from a URL to a map.
ArcGISTiledLayerUrlLoad an ArcGIS tiled layer from a URL.
ArcGISVectorTiledLayerUrlLoad an ArcGIS Vector Tiled Layer from a URL.
AuthorMapCreate and save a map as an ArcGIS `PortalItem` (i.e. web map).
BrowseWfsLayersBrowse a WFS service for layers and add them to the map.
BufferCreate a buffer around a map point and display the results as a `Graphic`
BufferListGenerate multiple individual buffers or a single unioned buffer around multiple points.
ChangeBasemapChange a map's basemap. A basemap is beneath all layers on a `Map` and is used to provide visual reference for the operational layers.
ChangeBlendRendererBlend a hillshade with a raster by specifying the elevation data. The resulting raster looks similar to the original raster, but with some terrain shading, giving it a textured look.
ChangeEncDisplaySettingsConfigure the display of ENC content.
ChangeFeatureLayerRendererChange the appearance of a feature layer with a renderer.
ChangeStretchRendererUse a stretch renderer to enhance the visual contrast of raster data for analysis.
ChangeSublayerRendererApply a renderer to a sublayer.
ChangeSublayerVisibilityChange the visibility of sublayers.
ChangeTimeExtentFilter data in layers by applying a time extent to a MapView.
ChangeViewpointSet the map view to a new viewpoint.
ClipGeometryClip a geometry with another geometry.
ClosestFacilityFind a route to the closest facility from a location.
ClosestFacilityStaticFind routes from several locations to the respective closest facility.
ControlAnnotationSublayerVisibilityUse annotation sublayers to gain finer control of annotation layer subtypes.
ConvexHullCreate a convex hull for a given set of points. The convex hull is a polygon with shortest perimeter that encloses a set of points. As a visual analogy, consider a set of points as nails in a board. The convex hull of the points would be like a rubber band stretched around the outermost nails.
ConvexHullListGenerate convex hull polygon(s) from multiple input geometries.
CreateAndSaveKmlFileConstruct a KML document and save it as a KMZ file.
CreateFeatureCollectionLayerCreate a Feature Collection Layer from a Feature Collection Table, and add it to a map.
CreateGeometriesCreate simple geometry types.
CustomDictionaryStyleUse a custom dictionary style (.stylx) to symbolize features using a variety of attribute values.
CutGeometryCut a geometry along a polyline.
DeleteFeaturesDelete features from an online feature service.
DensifyAndGeneralizeA multipart geometry can be densified by adding interpolated points at regular intervals. Generalizing multipart geometry simplifies it while preserving its general shape. Densifying a multipart geometry adds more vertices at regular intervals.
DictionaryRendererGraphicsOverlayThis sample demonstrates applying a dictionary renderer to graphics, in order to display military symbology without the need for a feature table.
DisplayAnnotationDisplay annotation from a feature service URL.
DisplayDeviceLocationDisplay your current position on the map, as well as switch between different types of auto pan Modes.
DisplayDrawingStatusGet the draw status of your map view or scene view to know when all layers in the map or scene have finished drawing.
DisplayGridDisplay coordinate system grids including Latitude/Longitude, MGRS, UTM and USNG on a map view. Also, toggle label visibility and change the color of grid lines and grid labels.
DisplayLayerViewStateDetermine if a layer is currently being viewed.
DisplayMapDisplay a map with an imagery basemap.
DisplaySubtypeFeatureLayerDisplays a composite layer of all the subtype values in a feature class.
DisplayUtilityAssociationsCreate graphics for utility associations in a utility network.
DisplayWfsDisplay a layer from a WFS service, requesting only features for the current extent.
DownloadPreplannedMapTake a map offline using a preplanned map area.
EditAndSyncFeaturesSynchronize offline edits with a feature service.
EditBranchVersioningCreate, query and edit a specific server version using service geodatabase.
EditFeatureAttachmentsAdd, delete, and download attachments for features from a service.
EditFeatureLinkedAnnotationEdit feature attributes which are linked to annotation through an expression.
ExportTilesDownload tiles to a local tile cache file stored on the device.
FeatureCollectionLayerFromPortalCreate a feature collection layer from a portal item.
FeatureCollectionLayerFromQueryCreate a feature collection layer to show a query result from a service feature table.
FeatureLayerDefinitionExpressionLimit the features displayed on a map with a definition expression.
FeatureLayerDictionaryRendererConvert features into graphics to show them with mil2525d symbols.
FeatureLayerGeodatabaseDisplay features from a local geodatabase.
FeatureLayerGeoPackageDisplay features from a local GeoPackage.
FeatureLayerQueryFind features in a feature table which match an SQL query.
FeatureLayerRenderingModeMapRender features statically or dynamically by setting the feature layer rendering mode.
FeatureLayerSelectionSelect features in a feature layer.
FeatureLayerShapefileOpen a shapefile stored on the device and display it as a feature layer with default symbology.
FeatureLayerTimeOffsetDisplay a time-enabled feature layer with a time offset.
FeatureLayerUrlShow features from an online feature service.
FindAddressFind the location for an address.
FindPlaceFind places of interest near a location or within a specific area.
FindRouteDisplay directions for a route between two points.
FindServiceAreaFind the service area within a network from a given point.
FindServiceAreasForMultipleFacilitiesFind the service areas of several facilities from a feature service.
FormatCoordinatesFormat coordinates in a variety of common notations.
GenerateGeodatabaseGenerate a local geodatabase from an online feature service.
GenerateOfflineMapTake a web map offline.
GenerateOfflineMapWithOverridesTake a web map offline with additional options for each layer.
GeodatabaseTransactionsUse transactions to manage how changes are committed to a geodatabase.
GeodesicOperationsCalculate a geodesic path between two points and measure its distance.
GeoViewSyncKeep the view points of two views (e.g. MapView and SceneView) synchronized with each other.
HonorMobileMapPackageExpirationAccess the expiration information of an expired mobile map package.
IdentifyGraphicsDisplay an alert message when a graphic is clicked.
IdentifyKmlFeaturesShow a callout with formatted content for a KML feature.
IdentifyLayersIdentify features in all layers in a map. MapView supports identifying features across multiple layers. Because some layer types have sublayers, the sample recursively counts results for sublayers within each layer.
IdentifyRasterCellGet the cell value of a local raster at the tapped location and display the result in a callout.
IntegratedWindowsAuthConnect to an IWA secured Portal and search for maps.
ListRelatedFeaturesList features related to the selected feature.
ListTransformationsGet a list of suitable transformations for projecting a geometry between two spatial references with different horizontal datums.
LoadWebTiledLayerDisplay a tiled web layer.
LocalServerFeatureLayerStart a local feature service and display its features in a map.
LocalServerGeoprocessingCreate contour lines from local raster data using a local geoprocessing package `.gpk` and the contour geoprocessing tool.
LocalServerMapImageLayerStart the Local Server and Local Map Service, create an ArcGIS Map Image Layer from the Local Map Service, and add it to a map.
ManageBookmarksAccess and create bookmarks on a map.
ManageOperationalLayersAdd, remove, and reorder operational layers in a map.
MapImageLayerTablesFind features in a spatial table related to features in a non-spatial table.
MapImageSublayerQueryFind features in a sublayer based on attributes and location.
MapReferenceScaleSet the map's reference scale and which feature layers should honor the reference scale.
MapRotationRotate a map.
MobileMapSearchAndRouteDisplay maps and use locators to enable search and routing offline using a Mobile Map Package.
NavigateRouteUse a routing service to navigate between points.
NavigateRouteReroutingNavigate between two points and dynamically recalculate an alternate route when the original route is unavailable.
NearestVertexFind the closest vertex and coordinate of a geometry to a point.
OAuthAuthenticate with ArcGIS Online (or your own portal) using OAuth2 to access secured resources (such as private web maps or layers).
OfflineBasemapByReferenceUse the `OfflineMapTask` to take a web map offline, but instead of downloading an online basemap, use one which is already on the device.
OfflineGeocodeGeocode addresses to locations and reverse geocode locations to addresses offline.
OfflineRoutingSolve a route on-the-fly using offline data.
OpenMapURLDisplay a web map.
OpenMobileMapDisplay a map from a mobile map package.
OpenStreetMapLayerAdd OpenStreetMap as a basemap layer.
PerformValveIsolationTraceRun a filtered trace to locate operable features that will isolate an area from the flow of network resources.
ProjectProject a point from one spatial reference to another.
QueryFeatureCountAndExtentZoom to features matching a query and count the features in the current visible extent.
RasterColormapRendererApply a colormap renderer to a raster.
RasterHillshadeUse a hillshade renderer on a raster.
RasterLayerFileCreate and use a raster layer made from a local raster file.
RasterLayerGeoPackageDisplay a raster contained in a GeoPackage.
RasterLayerImageServiceRasterCreate a raster layer from a raster image service.
RasterLayerRasterFunctionLoad a raster from a service, then apply a function to it.
RasterRenderingRuleDisplay a raster on a map and apply different rendering rules to that raster.
RasterRgbRendererApply an RGB renderer to a raster layer to enhance feature visibility.
ReadGeoPackageAdd rasters and feature tables from a GeoPackage to a map.
ReadShapefileMetadataRead a shapefile and display its metadata.
RenderPictureMarkersUse pictures for markers.
RenderSimpleMarkersShow a simple marker symbol on a map.
RenderUniqueValuesRender features in a layer using a distinct symbol for each unique attribute value.
ReverseGeocodeUse an online service to find the address for a tapped point.
RouteAroundBarriersFind a route that reaches all stops without crossing any barriers.
SearchPortalMapsFind webmap portal items by using a search term.
SelectEncFeaturesSelect features in an ENC layer.
ServiceFeatureTableCacheDisplay a feature layer from a service using the **on interaction cache** feature request mode.
ServiceFeatureTableManualCacheDisplay a feature layer from a service using the **manual cache** feature request mode.
ServiceFeatureTableNoCacheDisplay a feature layer from a service using the **no cache** feature request mode.
SetInitialMapAreaDisplay the map at an initial viewpoint representing a bounding geometry.
SetInitialMapLocationDisplay a basemap centered at an initial location and scale.
SetMapSpatialReferenceSpecify a map's spatial reference.
SetMinMaxScaleRestrict zooming between specific scale ranges.
ShowCalloutShow a callout with the latitude and longitude of user-tapped points.
ShowLabelsOnLayerDisplay custom labels on a feature layer.
ShowLocationHistoryDisplay your location history on the map.
ShowMagnifierTap and hold on a map to show a magnifier.
ShowPopupShow predefined popups from a web map.
SimpleRenderersDisplay common symbols for all graphics in a graphics overlay with a renderer.
SketchOnMapUse the Sketch Editor to edit or sketch a new point, line, or polygon geometry on to a map.
SpatialOperationsFind the union, intersection, or difference of two geometries.
SpatialRelationshipsDetermine spatial relationships between two geometries.
StatisticalQueryQuery a table to get aggregated statistics back for a specific field.
StyleWmsLayerChange the style of a Web Map Service (WMS) layer.
SymbolizeShapefileDisplay a shapefile with custom symbology.
SymbolsFromMobileStyleCombine multiple symbols from a mobile style file into a single symbol.
TakeScreenshotTake a screenshot of the map.
TimeBasedQueryQuery data using a time extent.
TokenSecuredChallengeThis sample demonstrates how to prompt the user for a username and password to authenticate with ArcGIS Server to access an ArcGIS token-secured service. Accessing secured services requires a login that's been defined on the server.
TraceUtilityNetworkDiscover connected features in a utility network using connected, subnetwork, upstream, and downstream traces.
UpdateAttributesUpdate feature attributes in an online feature service.
UpdateGeometriesUpdate a feature's location in an online feature service.
WfsXmlQueryLoad a WFS feature table using an XML query.
WmsIdentifyIdentify features in a WMS layer and display the associated popup content.
WMSLayerUrlDisplay a WMS layer using a WMS service URL.
WmsServiceCatalogConnect to a WMS service and show the available layers and sublayers.
WMTSLayerDisplay a layer from a Web Map Tile Service.