Map View
A view to render and allow interaction with 2D geographic content from an ArcGISMap on a screen. In a Model View Controller (MVC) architecture, this class represents the View and the Map object represents the Model.
To display a map, create a MapView of the required size and then set a Map object. The mapview will automatically load the map, its basemap, operational layers, and display their contents on screen.
MapView inherits from GeoView and adds 2D specific methods for map navigation that set the visible area of the map (the current extent) by setting a viewpoint. For example, MapView.setViewpointGeometryAsync(Geometry) zooms the map to the extent of a geometry, and MapView.setViewpointCenterAsync(Point) zooms the map to a given scale, centered at the given Point. More setViewpoint methods are available, including overloads where an animation duration can be specified. Geometries passed to these methods will be automatically re-projected if required. Use GeoView.getIsNavigating() or a Navigation Changed event to determine if navigation is ongoing or completed. Once navigation is complete, get the new viewpoint from getCurrentViewPoint.
The MapView comes with default gestures to allow users to pan, zoom, and rotate the map specific to each platform. Platforms also allow you to override these gestures with your own. Events are also available on the MapView to allow applications to be notified of gesture events.
Since
200.0.0
Properties
Various settings applied to the map view's background.
Allows users to interactively create and edit geometries by interacting with the view.
The InteractionOptions for this MapView.
True if attribution bar is visible in the GeoView, false otherwise.
Whether the configured insets are still valid after resizing the view.
The location display for the map view.
The MapView's current rotation.
A SharedFlow which emits DoubleTapEvent when the user double taps on the screen.
A SharedFlow which emits InteractiveZoomingChangeEvent when a user performs a pinch or double-tap-drag gesture on the GeoView.
A SharedFlow which emits LongPressEvent when a user holds a pointer on the screen.
A SharedFlow which emits PanChangeEvent when a user drags a pointer or pointers across the screen.
A SharedFlow which emits RotationChangeEvent when a user performs a rotation gesture on the GeoView.
A SharedFlow which emits ScaleChangeEvent when a user performs a pinch gesture on the GeoView.
A SharedFlow which emits SingleTapConfirmedEvents when the user taps once on the screen.
A SharedFlow which emits TwoPointerTapEvent when a user taps two pointers on the screen.
The map view's current units per DIP.
The bottom viewport inset of the MapView in device-independent pixels (dp).
The left viewport inset of the MapView in device-independent pixels (dp).
The right viewport inset of the MapView in device-independent pixels (dp).
The top viewport inset of the MapView in device-independent pixels (dp).
The map view's visible area.
The wrap around mode.
Inherited properties
The attribution text for the data that is currently displayed in the GeoView.
The GeoView's current draw status.
A collection containing the GraphicsOverlays.
Indicates whether the user is currently interacting with the GeoView.
Is the GeoView currently navigating.
True if the GeoView currently has wraparound turned on, false otherwise.
The view label properties. The view label properties are an overall control for whether labels will be created and displayed for layers added to the view. Individual layers can also control whether labels should be displayed for their features. Labels need to be enabled both in the view and in the layer. By default the labeling for a view is enabled. The view label properties also control global aspects of the label appearance e.g. animation effects.
A SharedFlow that emits when the view state of any layer in the GeoView changes.
A SharedFlow which emits a boolean to indicate that the navigation status of a GeoView has changed.
A SharedFlow that emits when the attribution bar's position or size changes due to expanding, collapsing, or inset changes.
The selection properties that is applied to the GeoView. This property allows configuration of new selection highlighting functionality such as selection promotion and switchable selection halo.
The SpatialReference is used to relate map coordinates to locations in the real world. This property is available when the view's map or scene has been loaded.
The current TimeExtent of the GeoView. The Time Extent of the GeoView defines how time-enabled data is displayed. Participating layers filter their data to only show data within the time extent set on the GeoView (see TimeAware for details). The range of the time extent includes the start and end values (a feature at 10/24/2016 would be included in a time extent defined as 10/24/2016 - 11/14/2016). Time filtering is not enabled until a non-null time extent is set on the GeoView. When the time extent is null on the GeoView, no time filtering is applied and all content is rendered.
A SharedFlow which notifies when the viewpoint of the view has changed.
Functions
Converts a coordinate within the map view's spatial reference to a screen coordinate (in pixels). If the wraparound mode is active, this method returns the closest screen location matching the specified map location. 'Closest' meaning: If it's in view, return that location, otherwise return for the frame where the location is the closest to the center of the view.
Converts a screen coordinate (in pixels) to a coordinate within the map view's spatial reference.
Sets the specified left, top, right, and bottom insets on the MapView. Insets control the active visible area, instructing the MapView to ignore parts that may be obstructed by overlaid UI elements and affecting the MapView's logical center, the reported visible area and the location display.
Change the map view to the viewpoint with duration and animation curve asynchronously.
Change the map view to the center point asynchronously.
Change the map view to the center point and scale asynchronously.
Change the map view to the bounding geometry asynchronously.
Change the map view to the bounding geometry with padding asynchronously.
Rotates the map view to the provided angle asynchronously.
Change the map view to zoom to a scale asynchronously.
Inherited functions
Exports the current view to the provided buffer.
Retrieve the current viewpoint for this GeoView.
Retrieve the layer's view state.
Initiate an Identify operation on the specified graphicsOverlay.
Initiate an Identify operation on all graphics overlays.
Initiate an Identify operation on the specified layer.
Initiate an Identify operation on all layers in the view.
Sets the GeoView's viewpoint with the bookmark's value. Applies the viewpoint of the bookmark to the GeoView.
Sets the TimeExtent? value of the timeExtent StateFlow property.
Change the GeoView to the new viewpoint. The viewpoint is updated instantaneously.
Change the GeoView to the new viewpoint with animation. This function uses the standard animation duration.
Change the GeoView to the new viewpoint with animation, taking the given number of seconds to complete the navigation.