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
Constructors
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.
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.