Show / Hide Table of Contents

Class MapView

A user interface control that displays two-dimensional (2D) geographic content defined by a Map.

Inheritance
object
BindableObject
Element
StyleableElement
NavigableElement
VisualElement
View
GeoView
MapView
Implements
INotifyPropertyChanged
IVisualTreeElement
IEffectControlProvider
IToolTipElement
IContextFlyoutElement
IAnimatable
IViewController
IVisualElementController
IElementController
IGestureController
IGestureRecognizers
IPropertyMapperView
IHotReloadableView
IReplaceableView
IMapView
IGeoView
IView
IElement
ITransform
GeoView.ShowCalloutForGeoElement(GeoElement, Point, CalloutDefinition)
GeoView.ShowCalloutAt(MapPoint, CalloutDefinition)
GeoView.ShowCalloutAt(MapPoint, VisualElement, Point)
GeoView.DismissCallout()
GeoView.IsCalloutVisible
GeoView.OnHandlerChanged()
GeoView.OnParentSet()
GeoView.ExportImageAsync()
GeoView.GetCurrentViewpoint(ViewpointType)
GeoView.SetViewpoint(Viewpoint)
GeoView.SetViewpointAsync(Viewpoint)
GeoView.SetViewpointAsync(Viewpoint, TimeSpan)
GeoView.SetBookmarkAsync(Bookmark)
GeoView.CancelSetViewpointOperations()
GeoView.GetLayerViewState(Layer)
GeoView.GetAnalysisViewState(Analysis)
GeoView.IdentifyGraphicsOverlayAsync(GraphicsOverlay, Point, double, bool)
GeoView.IdentifyGraphicsOverlayAsync(GraphicsOverlay, Point, double, bool, long)
GeoView.IdentifyGraphicsOverlaysAsync(Point, double, bool)
GeoView.IdentifyGraphicsOverlaysAsync(Point, double, bool, long)
GeoView.IdentifyLayerAsync(Layer, Point, double, bool)
GeoView.IdentifyLayerAsync(Layer, Point, double, bool, CancellationToken)
GeoView.IdentifyLayerAsync(Layer, Point, double, bool, long)
GeoView.IdentifyLayerAsync(Layer, Point, double, bool, long, CancellationToken)
GeoView.IdentifyLayersAsync(Point, double, bool)
GeoView.IdentifyLayersAsync(Point, double, bool, CancellationToken)
GeoView.IdentifyLayersAsync(Point, double, bool, long)
GeoView.IdentifyLayersAsync(Point, double, bool, long, CancellationToken)
GeoView.NavigationCompleted
GeoView.DrawStatusChanged
GeoView.LayerViewStateChanged
GeoView.SpatialReferenceChanged
GeoView.ViewpointChanged
GeoView.GeoViewTapped
GeoView.GeoViewDoubleTapped
GeoView.GeoViewHolding
GeoView.AnalysisViewStateChanged
GeoView.CriticalErrorChanged
GeoView.GeoModelErrorChanged
GeoView.GraphicsOverlaysProperty
GeoView.GraphicsOverlays
GeoView.IsAttributionTextVisibleProperty
GeoView.IsAttributionTextVisible
GeoView.AttributionText
GeoView.LabelingProperty
GeoView.Labeling
GeoView.ViewInsetsProperty
GeoView.ViewInsets
GeoView.TimeExtentProperty
GeoView.TimeExtent
GeoView.SpatialReference
GeoView.IsWrapAroundEnabled
GeoView.IsNavigating
GeoView.DrawStatus
GeoView.SelectionPropertiesProperty
GeoView.SelectionProperties
GeoView.GridProperty
GeoView.Grid
GeoView.ImageOverlaysProperty
GeoView.ImageOverlays
GeoView.AnalysisOverlaysProperty
GeoView.AnalysisOverlays
GeoView.GeoModelError
GeoView.CriticalError
View.VerticalOptionsProperty
View.HorizontalOptionsProperty
View.MarginProperty
View.propertyMapper
View.ChangeVisualState()
View.GetChildElements(Point)
View.OnBindingContextChanged()
View.GetRendererOverrides<T>()
View.GestureController
View.GestureRecognizers
View.HorizontalOptions
View.Margin
View.VerticalOptions
VisualElement.NavigationProperty
VisualElement.StyleProperty
VisualElement.InputTransparentProperty
VisualElement.IsEnabledProperty
VisualElement.XProperty
VisualElement.YProperty
VisualElement.AnchorXProperty
VisualElement.AnchorYProperty
VisualElement.TranslationXProperty
VisualElement.TranslationYProperty
VisualElement.WidthProperty
VisualElement.HeightProperty
VisualElement.RotationProperty
VisualElement.RotationXProperty
VisualElement.RotationYProperty
VisualElement.ScaleProperty
VisualElement.ScaleXProperty
VisualElement.ScaleYProperty
VisualElement.ClipProperty
VisualElement.VisualProperty
VisualElement.IsVisibleProperty
VisualElement.OpacityProperty
VisualElement.BackgroundColorProperty
VisualElement.BackgroundProperty
VisualElement.BehaviorsProperty
VisualElement.TriggersProperty
VisualElement.WidthRequestProperty
VisualElement.HeightRequestProperty
VisualElement.MinimumWidthRequestProperty
VisualElement.MinimumHeightRequestProperty
VisualElement.MaximumWidthRequestProperty
VisualElement.MaximumHeightRequestProperty
VisualElement.IsFocusedProperty
VisualElement.FlowDirectionProperty
VisualElement.WindowProperty
VisualElement.ShadowProperty
VisualElement.ZIndexProperty
VisualElement.BatchBegin()
VisualElement.BatchCommit()
VisualElement.Focus()
VisualElement.Measure(double, double)
VisualElement.Measure(double, double, MeasureFlags)
VisualElement.Unfocus()
VisualElement.InvalidateMeasure()
VisualElement.OnChildAdded(Element)
VisualElement.OnChildRemoved(Element, int)
VisualElement.OnChildrenReordered()
VisualElement.OnMeasure(double, double)
VisualElement.OnSizeAllocated(double, double)
VisualElement.SizeAllocated(double, double)
VisualElement.RefreshIsEnabledProperty()
VisualElement.Arrange(Rect)
VisualElement.ArrangeOverride(Rect)
VisualElement.Layout(Rect)
VisualElement.InvalidateMeasureOverride()
VisualElement.MeasureOverride(double, double)
VisualElement.MapBackgroundColor(IViewHandler, IView)
VisualElement.MapBackgroundImageSource(IViewHandler, IView)
VisualElement.MapAccessKeyHorizontalOffset(IViewHandler, IView)
VisualElement.MapAccessKeyPlacement(IViewHandler, IView)
VisualElement.MapAccessKey(IViewHandler, IView)
VisualElement.MapAccessKeyVerticalOffset(IViewHandler, IView)
VisualElement.Visual
VisualElement.FlowDirection
VisualElement.Window
VisualElement.AnchorX
VisualElement.AnchorY
VisualElement.BackgroundColor
VisualElement.Background
VisualElement.Behaviors
VisualElement.Bounds
VisualElement.Height
VisualElement.HeightRequest
VisualElement.InputTransparent
VisualElement.IsEnabled
VisualElement.IsEnabledCore
VisualElement.IsFocused
VisualElement.IsVisible
VisualElement.MinimumHeightRequest
VisualElement.MinimumWidthRequest
VisualElement.MaximumHeightRequest
VisualElement.MaximumWidthRequest
VisualElement.Opacity
VisualElement.Rotation
VisualElement.RotationX
VisualElement.RotationY
VisualElement.Scale
VisualElement.ScaleX
VisualElement.ScaleY
VisualElement.TranslationX
VisualElement.TranslationY
VisualElement.Triggers
VisualElement.Width
VisualElement.WidthRequest
VisualElement.X
VisualElement.Y
VisualElement.Clip
VisualElement.Resources
VisualElement.Frame
VisualElement.Handler
VisualElement.Shadow
VisualElement.ZIndex
VisualElement.DesiredSize
VisualElement.IsLoaded
VisualElement.ChildrenReordered
VisualElement.Focused
VisualElement.MeasureInvalidated
VisualElement.SizeChanged
VisualElement.Unfocused
VisualElement.Loaded
VisualElement.Unloaded
NavigableElement.Navigation
StyleableElement.Style
StyleableElement.StyleClass
StyleableElement.class
Element.AutomationIdProperty
Element.ClassIdProperty
Element.InsertLogicalChild(int, Element)
Element.AddLogicalChild(Element)
Element.RemoveLogicalChild(Element)
Element.ClearLogicalChildren()
Element.FindByName(string)
Element.RemoveDynamicResource(BindableProperty)
Element.SetDynamicResource(BindableProperty, string)
Element.OnPropertyChanged(string)
Element.OnParentChanging(ParentChangingEventArgs)
Element.OnParentChanged()
Element.OnHandlerChanging(HandlerChangingEventArgs)
Element.MapAutomationPropertiesIsInAccessibleTree(IElementHandler, Element)
Element.MapAutomationPropertiesLabeledBy(IElementHandler, Element)
Element.MapAutomationPropertiesHelpText(IElementHandler, Element)
Element.MapAutomationPropertiesName(IElementHandler, Element)
Element.MapAutomationPropertiesExcludedWithChildren(IElementHandler, Element)
Element.AutomationId
Element.ClassId
Element.Effects
Element.Id
Element.StyleId
Element.Parent
Element.ChildAdded
Element.ChildRemoved
Element.DescendantAdded
Element.DescendantRemoved
Element.ParentChanging
Element.ParentChanged
Element.HandlerChanging
Element.HandlerChanged
BindableObject.BindingContextProperty
BindableObject.ClearValue(BindableProperty)
BindableObject.ClearValue(BindablePropertyKey)
BindableObject.GetValue(BindableProperty)
BindableObject.IsSet(BindableProperty)
BindableObject.RemoveBinding(BindableProperty)
BindableObject.SetBinding(BindableProperty, BindingBase)
BindableObject.ApplyBindings()
BindableObject.OnPropertyChanging(string)
BindableObject.UnapplyBindings()
BindableObject.SetValue(BindableProperty, object)
BindableObject.SetValue(BindablePropertyKey, object)
BindableObject.CoerceValue(BindableProperty)
BindableObject.CoerceValue(BindablePropertyKey)
BindableObject.Dispatcher
BindableObject.BindingContext
BindableObject.PropertyChanged
BindableObject.PropertyChanging
BindableObject.BindingContextChanged
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: Esri.ArcGISRuntime.Maui
Assembly: Esri.ArcGISRuntime.Maui.dll
Syntax
[ContentProperty("Map")]
[WinRTRuntimeClassName("Microsoft.UI.Xaml.Data.INotifyPropertyChanged")]
[WinRTExposedType(typeof(MapViewWinRTTypeDetails))]
public class MapView : GeoView, INotifyPropertyChanged, IVisualTreeElement, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, IMapView, IGeoView, IView, IElement, ITransform
Remarks

The MapView is a container that holds a Map. A Map holds a collection of operational layers and Basemap. Layers are visual representations of geographic information and come in many forms. The types of layers that are displayed in a MapView are two dimensional in nature; meaning they are displayed in X/Y (a.k.a. Latitude/Longitude) coordinate space.

To display a Map, add a MapView control to your app and assign the map to it. This loads the map and its content, such as a Basemap and collection of operational layers, and displays this content on screen.

User interactions such as pan, zoom, rotate, and identify or selection are supported in the MapView using touch, mouse, keyboard, or pen/pencil. If required, you can override keys, clicks, and gestures to provide a specific user experience.

The visible area (Viewpoint) of the MapView is defined by the visible extent the map. To determine the current visible area or the center point and scale of a MapView, call GetCurrentViewpoint(ViewpointType). Make sure that any user-initiated or programmatic navigation is complete before getting the current Viewpoint by calling IsNavigating.

You can programmatically set the visible area by specifying a viewpoint. For example, SetViewpointGeometryAsync(Geometry) sets the visible area to the extent of a provided geometry, and SetViewpointCenterAsync(MapPoint) centers the map view at a given point. Any geometries passed to these methods are automatically projected to match the SpatialReference of the map view's Map, if required.

In an MVC architecture, the MapView represents the View tier. The Model tier is represented by the Map object which can provide a collection of operational layers and a Basemap. You can only set one Map per MapView, but you can swap the Map with another when the application is running. See the Map view discussion in the developer guide for more information.

Constructors

Name Description
MapView()

Initializes a new instance of the MapView class.

Fields

Name Description
BackgroundGridProperty

Identifies the BackgroundGrid bindable property.

GeometryEditorProperty

Identifies the GeometryEditor bindable property.

InteractionOptionsProperty

Identifies the InteractionOptions bindable property.

LocationDisplayProperty

Identifies the LocationDisplay bindable property.

MapProperty

Identifies the Map bindable property.

WrapAroundModeProperty

Identifies the WrapAroundMode bindable property.

Properties

Name Description
BackgroundGrid

Gets or sets the background grid rendered behind the map data.

GeometryEditor

Gets or sets a GeometryEditor that allows users to interactively create and edit geometries by interacting with the view.

InteractionOptions

Gets or sets a set of properties that control user interaction with the MapView.

LocationDisplay

Gets or sets the LocationDisplay.

Map

Gets or sets the map the view is rendering.

MapRotation

Gets the current rotational heading of the map

MapScale

Gets the current scale of the map

UnitsPerPixel

Gets the current size of each device independent pixel in map units.

VisibleArea

Gets the view's visible area.

WrapAroundMode

Gets or sets whether continuous panning across the international date line is enabled.

Methods

Name Description
IdentifyGeometryEditorAsync(Point, double)

Identifies all the elements in the GeometryEditor, at the given screen point.

LocationToScreen(MapPoint)

Converts a location in map coordinates to a screen coordinate relative to the upper-left corner of the map.

ScreenToLocation(Point)

Converts screen coordinates relative to the upper-left corner of the map view to a location in map coordinates.

SetViewpointAsync(Viewpoint, TimeSpan, AnimationCurve)

Animates the display to the new viewpoint using the provided animation curve. The AnimationCurve defines the animation easing function.

SetViewpointCenterAsync(MapPoint)

Centers the map view at the provided center point.

SetViewpointCenterAsync(MapPoint, double)

Centers the map view at the provided center point and zooms to the given scale.

SetViewpointCenterAsync(double, double)

Centers the view on the provided point.

SetViewpointCenterAsync(double, double, double)

Centers the view on the provided point and zooms to the provided scale.

SetViewpointGeometryAsync(Geometry)

Zooms and pans the map view to the extent of the provided geometry.

SetViewpointGeometryAsync(Geometry, double)

Zooms and pans the map view to the extent of the provided geometry with additional padding.

SetViewpointRotationAsync(double)

Sets the rotatation of the map view to the provided angle.

SetViewpointScaleAsync(double)

Zooms the map view to the provided scale around its current center point.

Applies to

TargetVersions
.NET200.0 - 300.0
.NET Windows200.0 - 300.0
.NET Android200.0 - 300.0
.NET iOS200.0 - 300.0
In this article
Provide feedback
Back to top Copyright © 2025 Esri.