Skip To Content ArcGIS for Developers Sign In Dashboard

MapView QML Type

A MapView that renders data in a map and allows users to interact with the map. More...

Import Statement: import Esri.ArcGISRuntime 100.9
Since: Esri.ArcGISRuntime 100.0
Inherits:

GeoView

Properties

Signals

Methods

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.

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
    Map {
        BasemapImageryWithLabels {}
    }
}

See also Cancelable, Map, and GeoView.

Property Documentation

allowMagnifierToPanMap : bool

Whether the magnifier should be allowed to pan the map.


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


[default] labeling : ViewLabelProperties

The labeling properties of the MapView.


locationDisplay : LocationDisplay

The location display used for displaying device location from a datasource such as a GPS sensor.


magnifierEnabled : bool

Whether the magnifier is enabled.


[default] map : Map

The Map property.


mapRotation : double

Returns the rotation of the MapView in degrees (read-only).


mapScale : double

Returns the scale of the MapView (read-only).


rotationByPinchingEnabled : bool

Whether rotation of the MapView by multi-touch pinching is enabled.


unitsPerDIP : double

Returns the units per device independent pixel of the MapView (read-only).


visibleArea : Polygon

Returns the visible area of the MapView (read-only).


wrapAroundMode : Enums.WrapAroundMode


zoomByPinchingEnabled : bool

Whether zooming of the MapView by multi-touch pinching is enabled.


Signal Documentation

allowMagnifierToPanMapChanged()

Emitted when the allowMagnifierToPanMap property changes.

Note: The corresponding handler is onAllowMagnifierToPanMapChanged.


backgroundGridChanged()

Emitted when the backgroundGrid property changes.

Note: The corresponding handler is onBackgroundGridChanged.


calloutDataChanged()

Emitted when the calloutData property changes.

Note: The corresponding handler is onCalloutDataChanged.


gridChanged()

Emitted when the grid property changes.

Note: The corresponding handler is onGridChanged.


labelingChanged()

Emitted when the labeling property changes.

Note: The corresponding handler is onLabelingChanged.


locationDisplayChanged()

Emitted when the locationDisplay property changes.

Note: The corresponding handler is onLocationDisplayChanged.


magnifierEnabledChanged()

Emitted when the magnifierEnabled property changes.

Note: The corresponding handler is onMagnifierEnabledChanged.


mapChanged()

Emitted when the map property changes.

Note: The corresponding handler is onMapChanged.


mapHeightChanged()

Emitted when the mapHeight property changes.

Note: The corresponding handler is onMapHeightChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


mapRotationChanged()

Emitted when the mapRotation property changes.

Note: The corresponding handler is onMapRotationChanged.


mapScaleChanged()

Emitted when the mapScale property changes.

Note: The corresponding handler is onMapScaleChanged.


mapWidthChanged()

Emitted when the mapWidth property changes.

Note: The corresponding handler is onMapWidthChanged.

This signal was introduced in Esri.ArcGISRuntime 100.4.


rotationByPinchingEnabledChanged()

Emitted when the rotationByPinchingEnabled property changes.

Note: The corresponding handler is onRotationByPinchingEnabledChanged.


visibleAreaChanged()

Emitted when the visibleArea property changes.

Note: The corresponding handler is onVisibleAreaChanged.


wrapAroundModeChanged()

Emitted when the wrapAroundMode property changes.

Note: The corresponding handler is onWrapAroundModeChanged.


zoomByPinchingEnabledChanged()

Emitted when the zoomByPinchingEnabled property changes.

Note: The corresponding handler is onZoomByPinchingEnabledChanged.


Method Documentation

point locationToScreen(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(screenX, double screenY)

Converts screenX and screenY screen coordinates to a Point in map view coordinates.


string setViewpointCenter(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(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(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(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.


string setViewpointRotation(angleDegrees)

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.


string setViewpointScale(scale)

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



Feedback on this topic?