Show / Hide Table of Contents

Class Viewpoint

Defines the visible area of a GeoModel that is displayed in a Esri.ArcGISRuntime.UI.Controls.GeoView.

Inheritance
System.Object
Viewpoint
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Esri.ArcGISRuntime.Mapping
Assembly: Esri.ArcGISRuntime.dll
Syntax
public class Viewpoint
Remarks

In a 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 Esri.ArcGISRuntime.UI.Controls.SceneView, a 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 InitialViewpoint. If you add the map or scene to a Esri.ArcGISRuntime.UI.Controls.GeoView, any change you make to the InitialViewpoint is ignored. To change the Viewpoint of a displayed map or scene, use view methods such as:

  • Esri.ArcGISRuntime.UI.Controls.GeoView.SetViewpoint(Esri.ArcGISRuntime.Mapping.Viewpoint) to instantly change the visible area with no animation.
  • Esri.ArcGISRuntime.UI.Controls.MapView.SetViewpointAsync(Esri.ArcGISRuntime.Mapping.Viewpoint,System.Single,Esri.ArcGISRuntime.UI.AnimationCurve) to animate the display of the map to a viewpoint using the provided animation curve.
  • Esri.ArcGISRuntime.UI.Controls.SceneView.SetViewpointCamera(Esri.ArcGISRuntime.Mapping.Camera) to instantly move the perspective in 3D scenes.

To determine the current visible area, call Esri.ArcGISRuntime.UI.Controls.GeoView.GetCurrentViewpoint(ViewpointType). Make sure that any user-initiated or programmatic navigation is complete before getting the current Viewpoint by checking the value of Esri.ArcGISRuntime.UI.Controls.GeoView.IsNavigating.

Constructors

Name Description
Viewpoint(Geometry)

Initializes a new instance of the Viewpoint class with a bounding extent.

Viewpoint(Geometry, Camera)

Initializes a new instance of the Viewpoint class using a bounding extent and a Camera.

Viewpoint(Geometry, Double)

Initializes a new instance of the Viewpoint class with a bounding extent and rotation.

Viewpoint(Geometry, Double, Camera)

Initializes a new instance of the Viewpoint class with a bounding extent, rotation, and Camera.

Viewpoint(MapPoint, Double)

Initializes a new instance of the Viewpoint class with center point and scale.

Viewpoint(MapPoint, Double, Camera)

Initializes a new instance of the Viewpoint class with center point, scale, and Camera.

Viewpoint(MapPoint, Double, Double)

Initializes a new instance of the Viewpoint class with center point, scale and rotation.

Viewpoint(MapPoint, Double, Double, Camera)

Initializes a new instance of the Viewpoint class with center point, scale, rotation, and Camera.

Viewpoint(Double, Double, Double)

Initializes a new instance of the Viewpoint class with latitude, longitude, and scale.

Viewpoint(Double, Double, Double, Camera)

Initializes a new instance of the Viewpoint class with latitude, longitude, scale, and Camera.

Properties

Name Description
Camera

Gets the viewpoint's Camera, if it has one.

Rotation

Gets the viewpoint rotation angle in degrees between 0 and 360.

TargetGeometry

Gets the viewpoint target geometry, if the ViewpointType is BoundingGeometry.

TargetScale

Gets the viewpoint's target scale, if the ViewpointType is CenterAndScale.

ViewpointType

Gets the viewpoint's type.

Methods

Name Description
FromJson(String)

Creates a Viewpoint instance from JSON.

ToJson()

Converts this instance to JSON.

See Also

InitialViewpoint

Applies to

TargetVersions
.NET Standard 2.0100.3 - 200.7
.NET100.13 - 200.7
.NET Windows100.13 - 200.7
.NET Android200.0 - 200.7
.NET iOS200.0 - 200.7
.NET Framework100.0 - 200.7
Xamarin.Android100.0 - 100.15
Xamarin.iOS100.0 - 100.15
UWP100.0 - 200.7

Relevant samples

Add ENC exchange set: Display nautical charts per the ENC specification.
Add graphics with symbols: Use a symbol style to display a graphic on a graphics overlay.
Analyze hotspots: Use a geoprocessing service and a set of features to identify statistically significant hot spots and cold spots.
Buffer list: Generate multiple individual buffers or a single unioned buffer around multiple points.
In This Article
Back to top Copyright © 2022 Esri.