Viewpoint

Defines the visible area of a GeoModel that is displayed in a com.arcgismaps.mapping.view.GeoView on a user's screen. In a com.arcgismaps.mapping.view.MapView, the bounding extent of a geometry or the map's center point and scale can define the map view's two-dimensional Viewpoint.

In a com.arcgismaps.mapping.view.SceneView, a com.arcgismaps.mapping.view.Camera represents the observer's position and perspective within three dimensions and defines the scene view's three-dimensional Viewpoint. Each camera has the following properties:

  • Geographic location on the surface (longitude and latitude).

  • Altitude (height, in meters, above sea level).

  • Heading (angle about the z axis the camera is rotated, in degrees)

  • Pitch (angle the camera is rotated up or down, in degrees)

  • Roll (angle the camera is rotated side-to-side, in degrees)

When you publish or save a map or scene, as a web map, web scene, mobile map package, or mobile scene package, you define its initial Viewpoint. When you load a map or scene into your app, you can access and change the value of this GeoModel.initialViewpoint. If you add the map or scene to a com.arcgismaps.mapping.view.GeoView, any change you make to the GeoModel.initialViewpoint is ignored. To change the Viewpoint of a displayed map or scene, use view methods such as:

To determine the current visible area, call com.arcgismaps.mapping.view.GeoView.getCurrentViewpoint. Make sure that any user-initiated or programmatic navigation is complete before getting the current Viewpoint by calling com.arcgismaps.mapping.view.GeoView.isNavigating.

Since

200.1.0

Constructors

Link copied to clipboard
constructor(boundingGeometry: Geometry, camera: Camera)

Create a viewpoint with a bounding extent and a com.arcgismaps.mapping.view.Camera.

constructor(center: Point, scale: Double, camera: Camera)

Creates a viewpoint with center point, scale, and com.arcgismaps.mapping.view.Camera.

constructor(latitude: Double, longitude: Double, scale: Double, camera: Camera? = null)

Create a viewpoint with latitude, longitude, scale, and Camera. The spatial reference for the defined point is WGS84.

constructor(boundingGeometry: Geometry, rotation: Double? = null, camera: Camera? = null)

Create a viewpoint with a bounding Geometry, rotation, and Camera.

constructor(center: Point, scale: Double, rotation: Double? = null, camera: Camera? = null)

Create a viewpoint with center point, scale, rotation, and Camera.

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

The viewpoint's com.arcgismaps.mapping.view.Camera, if it has one.

Link copied to clipboard

The viewpoint rotation angle in degrees between 0 and 360.

Link copied to clipboard
Link copied to clipboard

The viewpoint's target scale, if the Viewpoint.viewpointType is ViewpointType.CenterAndScale.

Link copied to clipboard

The viewpoint's type. This will be defined by a geometry or a com.arcgismaps.geometry.Point geometry and scale.

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int

Inherited functions

Link copied to clipboard
open override fun toJson(): String

Convert an object to JSON string.