Click or drag to resize

MapView Class

The MapView is a container that holds a Map. It is the mapping component of the ArcGIS Runtime .NET SDK. It can contain mapping layers and responds to user interaction (touch, mouse, keyboard) and provides behavior for map navigation. It has multiple properties such as its extent, scale, zoom factor, rotation, etc.
Inheritance Hierarchy
SystemObject
  Java.Lang.Object
    Xamarin.Forms.View
      Android.Views.ViewGroup
        Esri.ArcGISRuntime.UI.ControlsGeoView
          Esri.ArcGISRuntime.UI.ControlsMapView

Namespace:  Esri.ArcGISRuntime.UI.Controls
Assembly:  Esri.ArcGISRuntime.Android (in Esri.ArcGISRuntime.Android.dll) Version: 100.11.0.0
Syntax
C#
public class MapView : GeoView

The MapView type exposes the following members.

Constructors
  NameDescription
Public methodMapView
Initializes a new instance of the MapView class.
Public methodMapView(Context)
Initializes a new instance of the MapView class.
Public methodMapView(Context, IAttributeSet)
Initializes a new instance of the MapView class.
Top
Properties
  NameDescription
Public propertyAttributionText
Gets the full attribution text for all active layers, concatenated into a single string.
(Inherited from GeoView.)
Public propertyBackgroundGrid
Gets or sets the background grid rendered behind the map data.
Public propertyCalloutStyle
Gets or sets the CalloutStyle for callouts on this GeoView.
(Inherited from GeoView.)
Public propertyDrawStatus
Returns the current draw status
(Inherited from GeoView.)
Public propertyGraphicsOverlays
Gets or sets the GraphicsOverlayCollection.
(Inherited from GeoView.)
Public propertyGrid
Gets or sets the grid that is available to the map for display.
Public propertyInteractionOptions
Gets or sets a set of properties that control user interaction with the MapView.
Public propertyIsAttributionTextVisible
Gets or sets a value indicating whether Esri attribution text is visible.
(Inherited from GeoView.)
Public propertyIsCalloutVisible
Gets a value indicating whether a callout is currently open
(Inherited from GeoView.)
Public propertyIsNavigating
Gets a value indicating whether the map is currently navigating. when navigation has finished the NavigationCompleted event will be raised.
(Inherited from GeoView.)
Public propertyIsWrapAroundEnabled
Indicates whether the wrap around feature is currently active. For wrap around to be active the WrapAroundMode property must be set to true and the SpatialReference of the MapView control must be a SpatialReference that supports wrapping.
(Inherited from GeoView.)
Public propertyLocationDisplay
Gets or sets the location display settings used for display the device's current location.
Public propertyMap
Gets or sets the map the view is rendering.
Public propertyMapRotation
Gets the current rotational heading of the map
Public propertyMapScale
Gets the current scale of the map
Public propertySketchEditor
Gets or sets the sketch editor used for drawing and editing on the map.
Public propertySpatialReference
Gets the current spatial reference of the map
(Inherited from GeoView.)
Public propertyUnitsPerPixel
Gets the current size of each device independent pixel in map units.
Public propertyViewInsetsBottom
Gets the bottom view inset
(Inherited from GeoView.)
Public propertyViewInsetsLeft
Gets the left view inset
(Inherited from GeoView.)
Public propertyViewInsetsRight
Gets the right view inset
(Inherited from GeoView.)
Public propertyViewInsetsTop
Gets the top view inset
(Inherited from GeoView.)
Public propertyVisibleArea
Gets the view's visible area.
Public propertyWrapAroundMode
Gets or sets a whether the map will do continuous pan across the antimeridian
Top
Methods
  NameDescription
Public methodCancelSetViewpointOperations
Cancels any pending or currently running SetViewpointAsync operations.
(Overrides GeoViewCancelSetViewpointOperations.)
Public methodDismissCallout
Dismisses a callout if it's open.
(Inherited from GeoView.)
Protected methodDispose
Releases the unmanaged resources used by the MapView and optionally releases the managed resources
(Overrides GeoView.Dispose(Boolean).)
Public methodExportImageAsync
Creates an image snapshot of the current map view
(Inherited from GeoView.)
Public methodGetCurrentViewpoint
Gets the current Viewpoint of the view.
(Inherited from GeoView.)
Public methodGetLayerViewState
Gets the LayerViewState for the given layer.
(Inherited from GeoView.)
Public methodIdentifyGraphicsOverlayAsync(GraphicsOverlay, PointF, Double, Boolean)
Initiates an identify operation on the specified graphics overlay which will return the visible topmost graphic.
(Inherited from GeoView.)
Public methodIdentifyGraphicsOverlayAsync(GraphicsOverlay, PointF, Double, Boolean, Int64)
Initiates an identify operation on the specified graphics overlay.
(Inherited from GeoView.)
Public methodIdentifyGraphicsOverlaysAsync(PointF, Double, Boolean)
Initiate an identify operation on all graphics overlays which will return the single visible topmost graphic per overlay only.
(Inherited from GeoView.)
Public methodIdentifyGraphicsOverlaysAsync(PointF, Double, Boolean, Int64)
Initiate an identify operation on all graphics overlays.
(Inherited from GeoView.)
Public methodIdentifyLayerAsync(Layer, PointF, Double, Boolean)
Initiates an identify operation on the specified layer which will return the single visible topmost GeoElement only.
(Inherited from GeoView.)
Public methodIdentifyLayerAsync(Layer, PointF, Double, Boolean, Int64)
Initiates an identify operation on the specified layer.
(Inherited from GeoView.)
Public methodIdentifyLayerAsync(Layer, PointF, Double, Boolean, CancellationToken)
Initiates an identify operation on the specified layer which will return the single visible topmost GeoElement only.
(Inherited from GeoView.)
Public methodIdentifyLayerAsync(Layer, PointF, Double, Boolean, Int64, CancellationToken)
Initiates an identify operation on the specified layer.
(Inherited from GeoView.)
Public methodIdentifyLayersAsync(PointF, Double, Boolean)
Initiates an identify operation on all layers in the view which will return the single visible topmost GeoElement per layer only.
(Inherited from GeoView.)
Public methodIdentifyLayersAsync(PointF, Double, Boolean, Int64)
Initiates an identify operation on all layers in the view.
(Inherited from GeoView.)
Public methodIdentifyLayersAsync(PointF, Double, Boolean, CancellationToken)
Initiates an identify operation on all layers in the view which will return the single visible topmost GeoElement per layer only.
(Inherited from GeoView.)
Public methodIdentifyLayersAsync(PointF, Double, Boolean, Int64, CancellationToken)
Initiates an identify operation on all layers in the view.
(Inherited from GeoView.)
Public methodLocationToScreen
Converts a location in map coordinates to a screen coordinate relative to the upper-left corner of the map.
Public methodScreenToLocation
Converts a screen point relative to the upper left of the map into a location on the map.
Public methodSetViewInsets
Gets or sets the viewport padding in pixels.
(Inherited from GeoView.)
Public methodSetViewpoint
Sets the view to the given Viewpoint location
(Inherited from GeoView.)
Public methodSetViewpointAsync(Viewpoint)
Animates the view to the given Viewpoint location
(Inherited from GeoView.)
Public methodSetViewpointAsync(Viewpoint, TimeSpan)
Animates the view to the given Viewpoint location
(Inherited from GeoView.)
Public methodSetViewpointAsync(Viewpoint, TimeSpan, AnimationCurve)
Animates the view to the given Viewpoint location using the provided animation curve
Public methodSetViewpointCenterAsync(MapPoint)
Centers the view on the provided point.
Public methodSetViewpointCenterAsync(Double, Double)
Centers the view on the provided point.
Public methodSetViewpointCenterAsync(MapPoint, Double)
Centers the view on the provided point and zooms to the provided scale.
Public methodSetViewpointCenterAsync(Double, Double, Double)
Centers the view on the provided point and zooms to the provided scale.
Public methodSetViewpointGeometryAsync(Geometry)
Zooms to the provided geometry.
Public methodSetViewpointGeometryAsync(Geometry, Double)
Zooms to the provided geometry and leaves some padding around the geometry.
Public methodSetViewpointRotationAsync
Sets the rotation angle of the map
Public methodSetViewpointScaleAsync
Zooms to the given scale.
Public methodShowCalloutAt(MapPoint, CalloutDefinition)
Shows a callout based on a CalloutDefinition at the given location.
(Inherited from GeoView.)
Public methodShowCalloutAt(MapPoint, View, PointF)
Shows a callout at the given location with Visual Element as content
(Inherited from GeoView.)
Public methodShowCalloutForGeoElement
Shows a callout for the given GeoElement at an appropriate location for the tap location by snapping to the geometry of the element.
(Inherited from GeoView.)
Top
Events
  NameDescription
Public eventDrawStatusChanged
Occurs when the DrawStatus property of this instance changes.
(Inherited from GeoView.)
Public eventGeoViewDoubleTapped
Occurs when an otherwise unhandled DoubleTap interaction occurs over the hit test area of the view.
(Inherited from GeoView.)
Public eventGeoViewHolding
Occurs when an otherwise unhandled holding interaction occurs over the hit test area of the view.
(Inherited from GeoView.)
Public eventGeoViewTapped
Occurs when an otherwise unhandled Tap interaction occurs over the hit test area of the view.
(Inherited from GeoView.)
Public eventLayerViewStateChanged
Occurs when the LayerViewState of a contained layer changes.
(Inherited from GeoView.)
Public eventNavigationCompleted
When navigation on the map has completed this event will be raised.
(Inherited from GeoView.)
Public eventSpatialReferenceChanged
Occurs when spatial reference of the view changes.
(Inherited from GeoView.)
Public eventViewpointChanged
Occurs when the current viewpoint changes.
(Inherited from GeoView.)
Top
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.

There is only one Map per MapView and it is set by the MapView.Map Property. Multiple Map objects can be created and swapped out dynamically as the application is running in the MapView.

See Also