MapCamera class Maps & 3D Scenes

Low-level control of the map view camera.

Obtain an instance from a GemMapController.camera. Do not construct this class directly.

Primary responsibilities include persisting and restoring camera state via cameraState, inspecting the live camera position and orientation, applying direct camera transforms or using higher-level helpers such as setCameraTargetCentered and setCameraRelativeToTarget, and computing candidate camera placements with the helper methods.

Typically, camera manipulation is performed via higher-level methods on GemMapController or other high-level classes such as FollowPositionPreferences and MapViewPreferences.

See also:

Properties

cameraOrientation Point3d
Set the camera orientation using heading/pitch/roll (degrees).
no getter
cameraPosition Coordinates
Position the camera using geographic coordinates (lon/lat/alt).
no getter
cameraState Uint8List
Saves the current state of the camera into a binary format.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
mapId int
no setter
orientation Point4d
Retrieves the current orientation of the camera.
getter/setter pair
pointerId int
no setter
position Point3d
Retrieves the current position of the camera.
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

generatePositionAndOrientation(Coordinates targetCoords) → (GemError, PositionOrientation)
Compute a candidate camera position and orientation for targetCoords.
generatePositionAndOrientationHPR(Coordinates targetCoords, Point3d headingPitchRollDeg) → (GemError, PositionOrientation)
Compute a candidate camera position and orientation using explicit heading/pitch/roll (HPR).
generatePositionAndOrientationRelativeToCenteredTarget(Coordinates targetCoords, Point3d targetHeadingPitchRollDeg, Point3d cameraHeadingPitchDegDistanceMeters) → (GemError, PositionOrientation)
Compute camera placement relative to a target that has its own orientation.
generatePositionAndOrientationRelativeToTarget(Coordinates targetCoords, Point3d targetHeadingPitchRollDeg, Point3d cameraHeadingPitchDegDistanceMeters, Point3d cameraHeadingPitchRollDeg) → (GemError, PositionOrientation)
Compute a camera placement relative to a target, allowing arbitrary camera orientation.
generatePositionAndOrientationTargetCentered(Coordinates targetCoords, Point3d cameraHeadingPitchDegDistanceMeters) → (GemError, PositionOrientation)
Compute a camera placement centered on and oriented toward targetCoords.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setCameraRelativeToCenteredTarget(Coordinates targetCoords, Point3d targetHeadingPitchRollDeg, Point3d cameraHeadingPitchDegDistanceMeters) → void
Set the camera relative to a target that has its own orientation.
setCameraRelativeToTarget(Coordinates targetCoords, Point3d targetHeadingPitchRollDeg, Point3d cameraHeadingPitchDegDistanceMeters, Point3d cameraHeadingPitchRollDeg) → void
Set the camera relative to a target and allow arbitrary camera orientation.
setCameraTargetCentered(Coordinates coords, Point3d pos) → void
Set the camera to look at a geographic target (sphere coordinate system).
toString() String
A string representation of this object.
inherited

Operators

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