Skip To Content ArcGIS for Developers Sign In Dashboard

Viewpoint QML Type

Base type for types describing the user's viewpoint when viewing a map or scene. More...

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

Object

Inherited By:

ViewpointCenter and ViewpointExtent

Properties

Signals

Detailed Description

Note: You cannot declare or create a component of this type in QML code.

Use a Viewpoint to specify how a user sees a 2D Map or 3D Scene displayed in a MapView or SceneView. The Viewpoint controls multiple aspects of the view such as extent, rotation, and with 3D viewing angle and field of view.

Instances of ViewpointCenter and ViewpointExtent are immutable.

A Viewpoint contains two views

A Viewpoint object contains two views - one 2D and one 3D. A Viewpoint object stores the 3D view in a Camera member object. The 2D and 3D views need not view the same location. Viewpoints also contain 2D view information like scale, extent, and rotation, even when Camera information is not present. When a Viewpoint is passed from one SceneView to another, only the 3D information (if present) and time are used. When a SceneView receives a Viewpoint that has no Camera (such as a Viewpoint retrieved from a MapView) the SceneView approximates the 3D viewpoint information from the 2D viewpoint information.

Example:

Create a viewpoint based on a point and programatically zoom to it:

var soCalPoint = ArcGISRuntimeEnvironment.createObject("Point", {x: -117, y: 34, spatialReference: SpatialReference.createWgs84()});
var soCalViewpoint = ArcGISRuntimeEnvironment.createObject("ViewpointCenter", {center: soCalPoint, targetScale: 500000});
mapView.setViewpoint(soCalViewpoint);

See also JsonSerializable, MapView, ViewpointCenter, and ViewpointExtent.

Property Documentation

[default] camera : Camera

The camera of this Viewpoint.


json : jsobject

The JSON representing this Viewpoint.


rotation : string

The rotation of this Viewpoint.


unknownJson : jsobject

Returns the unknown JSON from the source JSON.

See also JsonSerializable.


unsupportedJson : jsobject

Returns the unsupported data from the source JSON.

See also JsonSerializable.


viewpointType : Enums.ViewpointType

Returns the Enums.ViewpointType of this Viewpoint (read-only).


Signal Documentation

cameraChanged()

Emitted when the camera property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.


rotationChanged()

Emitted when the rotation property changes.

Note: This signal will only be emitted when the property initializes during the instantiation of the component.

This QML signal was introduced in Esri.ArcGISRuntime 100.4.



Feedback on this topic?