A MapView that renders data in a map and allows users to interact with the map. More...
Import Statement: | import Esri.ArcGISRuntime 100.15 |
Since: | Esri.ArcGISRuntime 100.0 |
Inherits: |
Properties
- allowMagnifierToPanMap : bool
- backgroundGrid : BackgroundGrid
- calloutData : CalloutData
- grid : ArcGISGrid
- locationDisplay : LocationDisplay
- magnifierEnabled : bool
- map : Map
- mapRotation : double
- mapScale : double
- rotationByPinchingEnabled : bool
- sketchEditor : SketchEditor
- unitsPerDIP : double
- visibleArea : Polygon
- wrapAroundMode : Enums.WrapAroundMode
- zoomByPinchingEnabled : bool
Signals
- allowMagnifierToPanMapChanged()
- backgroundGridChanged()
- calloutDataChanged()
- gridChanged()
- locationDisplayChanged()
- magnifierEnabledChanged()
- mapChanged()
- mapRotationChanged()
- mapScaleChanged()
- rotationByPinchingEnabledChanged()
- sketchEditorChanged()
- visibleAreaChanged()
- wrapAroundModeChanged()
- zoomByPinchingEnabledChanged()
Methods
- point locationToScreen(Point mapPoint)
- Point screenToLocation(double screenX, double screenY)
- string setViewpointCenter(Point center)
- string setViewpointCenterAndScale(Point center, double scale)
- string setViewpointGeometry(Geometry boundingGeometry)
- string setViewpointGeometryAndPadding(Geometry boundingGeometry, double paddingInDIPS)
- string setViewpointRotation(double angleDegrees)
- string setViewpointScale(double scale)
- string setViewpointWithAnimationCurve(Viewpoint viewpoint, real durationSeconds, AnimationCurve curve)
Detailed Description
In a Model-View-Controller (MVC) architecture, a map view represents the view and a map represents the model.
This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.
Type | Default Property |
---|---|
Map | map |
ArcGISGrid | grid |
BackgroundGrid | backgroundGrid |
SketchEditor | sketchEditor |
Refer to the GeoView documentation for any additional default properties.
Example:
Create MapView that contains a Map with the Imagery with Labels Basemap:
MapView { anchors.fill: parent Component.onCompleted: { // Set the focus on MapView to initially enable keyboard navigation forceActiveFocus(); } Map { Basemap { initStyle: Enums.BasemapStyleArcGISImagery } } }
See also Cancelable, Map, and GeoView.
Property Documentation
[default] backgroundGrid : BackgroundGrid |
Various settings applied to the map view's background.
The background grid determines the color and context grid of a map view when no MapView.map has been set.
The Map displays on top of the background grid or the optional Map.backgroundColor to determine what is displayed under transparent areas of the map.
If Map.backgroundColor is not null
, then backgroundGrid is ignored and Map.backgroundColor will be used as the background color of the map.
calloutData : CalloutData |
The data and location used for displaying a callout on the map.
The callout data that is returned can be modified, and then used with a view for display.
[default] grid : ArcGISGrid |
The map view's grid. The grid displays over the map.
locationDisplay : LocationDisplay |
The location display used for displaying device location from a datasource such as a GPS sensor.
[default] map : Map |
The map that is currently set to the map view.
Setting a non-loaded map to a view starts the load process of the map so the map can be displayed once loaded.
Returns the rotation of the MapView in degrees (read-only).
Returns the scale of the MapView (read-only).
Whether rotation of the MapView by multi-touch pinching is enabled.
[default] sketchEditor : SketchEditor |
Sets the map view's sketch editor to sketchEditor.
This property was introduced in Esri.ArcGISRuntime 100.12.
Returns the units per device independent pixel of the MapView (read-only).
The Enums.WrapAroundMode of the MapView.
Whether zooming of the MapView by multi-touch pinching is enabled.
Signal Documentation
Emitted when the allowMagnifierToPanMap property changes.
Note: The corresponding handler is onAllowMagnifierToPanMapChanged
.
Emitted when the backgroundGrid property changes.
Note: The corresponding handler is onBackgroundGridChanged
.
Emitted when the calloutData property changes.
Note: The corresponding handler is onCalloutDataChanged
.
Emitted when the grid property changes.
Note: The corresponding handler is onGridChanged
.
Emitted when the locationDisplay property changes.
Note: The corresponding handler is onLocationDisplayChanged
.
Emitted when the magnifierEnabled property changes.
Note: The corresponding handler is onMagnifierEnabledChanged
.
Emitted when the map property changes.
Note: The corresponding handler is onMapChanged
.
Emitted when the mapRotation property changes.
Note: The corresponding handler is onMapRotationChanged
.
Emitted when the mapScale property changes.
Note: The corresponding handler is onMapScaleChanged
.
Emitted when the rotationByPinchingEnabled property changes.
Note: The corresponding handler is onRotationByPinchingEnabledChanged
.
Emitted when the sketchEditor property changes.
Note: The corresponding handler is onSketchEditorChanged
.
This signal was introduced in Esri.ArcGISRuntime 100.9.
Emitted when the visibleArea property changes.
Note: The corresponding handler is onVisibleAreaChanged
.
Emitted when the wrapAroundMode property changes.
Note: The corresponding handler is onWrapAroundModeChanged
.
Emitted when the zoomByPinchingEnabled property changes.
Note: The corresponding handler is onZoomByPinchingEnabledChanged
.
Method Documentation
point locationToScreen(Point mapPoint) |
Converts mapPoint within the map view's spatial reference to a screen coordinate.
If the Enums.WrapAroundMode on the map view is enabled, this method returns the closest screen location matching the specified map location. If the closest screen coordinate is visible then that location is returned. Otherwise, the screen coordinate for the frame where the location is the closest to the center of the view is returned.
This method cannot be called until a map has been given to the map view. If this method is called before the map view is ready, an error will occur.
Point screenToLocation(double screenX, double screenY) |
Converts screenX and screenY screen coordinates to a Point in map view coordinates.
string setViewpointCenter(Point center) |
Sets the viewpoint with a center point.
- center - The center point to set.
Returns a task ID that can be used to cancel the setViewpointCenter task.
See also Cancelable.
string setViewpointCenterAndScale(Point center, double scale) |
Sets the viewpoint with a center point and scale.
- center - The center point to set.
- scale - The scale to zoom to.
Returns a task ID that can be used to cancel the setViewpointCenterAndScale task.
See also Cancelable.
string setViewpointGeometry(Geometry boundingGeometry) |
Sets the viewpoint with a bounding geometry.
- boundingGeometry - The bounding geometry to set.
Returns a task ID that can be used to cancel the setViewpointGeometry task.
See also Cancelable.
string setViewpointGeometryAndPadding(Geometry boundingGeometry, double paddingInDIPS) |
Sets the viewpoint with a bounding geometry and padding.
- boundingGeometry - The bounding geometry to set.
- paddingInDIPS - The space in device independent pixels (DIPS) to expand the viewport by.
Returns a task ID that can be used to cancel the setViewpointGeometryAndPadding task.
See also Cancelable.
Sets the viewpoint with rotation.
- angleDegrees - The angle of the rotation to set in degrees.
Returns a task ID that can be used to cancel the setViewpointRotation task.
See also Cancelable.
Sets the viewpoint with scale.
- scale - The scale to zoom to.
Returns a task ID that can be used to cancel the setViewpointScale task.
See also Cancelable.
string setViewpointWithAnimationCurve(Viewpoint viewpoint, real durationSeconds, AnimationCurve curve) |
Sets the viewpoint with custom animation options.
- viewpoint - The viewpoint to set.
- durationSeconds - The number of seconds for the animation to take.
- curve - The Enums.AnimationCurve type to use.
Returns a task ID that can be used to cancel the setViewpointWithAnimationCurve task.
See also Cancelable.