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

The map view's background grid. The map is displayed on top of this background grid.


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.


backgroundGridChanged()

Emitted when the backgroundGrid property changes.


calloutDataChanged()

Emitted when the calloutData property changes.


gridChanged()

Emitted when the grid property changes.


labelingChanged()

Emitted when the labeling property changes.


locationDisplayChanged()

Emitted when the locationDisplay property changes.


magnifierEnabledChanged()

Emitted when the magnifierEnabled property changes.


mapChanged()

Emitted when the map property changes.


mapHeightChanged()

Emitted when the mapHeight property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


mapRotationChanged()

Emitted when the mapRotation property changes.


mapScaleChanged()

Emitted when the mapScale property changes.


mapWidthChanged()

Emitted when the mapWidth property changes.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


rotationByPinchingEnabledChanged()

Emitted when the rotationByPinchingEnabled property changes.


visibleAreaChanged()

Emitted when the visibleArea property changes.


wrapAroundModeChanged()

Emitted when the wrapAroundMode property changes.


zoomByPinchingEnabledChanged()

Emitted when the zoomByPinchingEnabled property changes.


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.


string setViewpointRotation(double 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(double 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 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?