Viewpoint class final

Defines the visible area of a GeoModel that is displayed in a GeoViewController on a user's screen.

In an ArcGISMapViewController, 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 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 GeoModel.initialViewpoint. If you add the map or scene to a GeoViewController, 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 GeoViewController.getCurrentViewpoint. Make sure that any user-initiated or programmatic navigation is complete before getting the current Viewpoint by calling GeoViewController.isNavigating.

Implemented types
Mixed in types

Constructors

Viewpoint.fromCenter(ArcGISPoint center, {required double scale, double rotation = double.nan})
Creates a viewpoint with center point, scale, and rotation.
factory
Viewpoint.fromJson(Map<String, dynamic> json)
factory
Viewpoint.fromJsonString(String jsonString)
factory
Viewpoint.fromTargetExtent(Geometry targetExtent, {double rotation = double.nan})
Creates a viewpoint with a bounding extent and rotation.
factory
Viewpoint.withLatLongScale({required double latitude, required double longitude, required double scale})
Creates a viewpoint with latitude, longitude, and scale.
factory

Properties

hashCode int
The hash code for this object.
no setteroverride
rotation double
The viewpoint rotation angle in degrees between 0 and 360.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
targetGeometry Geometry
The viewpoint target geometry, if the Viewpoint.viewpointType is ViewpointType.boundingGeometry.
no setter
targetScale double
The viewpoint's target scale, if the Viewpoint.viewpointType is ViewpointType.centerAndScale.
no setter
viewpointType ViewpointType
The viewpoint's type.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Returns a JSON representation of this Object in the data type used by jsonDecode.
inherited
toJsonString() String
Returns a JSON representation of this Object as a String.
override
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
override