FreeCameraOptionsGeography extension

Helpers that set FreeCameraOptions from geographic values.

The helpers are pure math and give the same result on all platforms. Each helper returns new options and does not change these options.

final camera = const FreeCameraOptions()
    .withLocation(Point(coordinates: Position(7.4246, 43.7384)), altitude: 300)
    .lookingAt(Point(coordinates: Position(7.4290, 43.7350)));
on

Properties

altitude → double?

Available on FreeCameraOptions, provided by the FreeCameraOptionsGeography extension

The altitude of the camera above sea level in meters, or null if FreeCameraOptions.position is null.
no setter
location → Point?

Available on FreeCameraOptions, provided by the FreeCameraOptionsGeography extension

The geographic location of the camera, or null if FreeCameraOptions.position is null.
no setter

Methods

lookingAt(Point target, {double altitude = 0, FreeCameraPosition up = const FreeCameraPosition(x: 0, y: 0, z: 1)}) → FreeCameraOptions

Available on FreeCameraOptions, provided by the FreeCameraOptionsGeography extension

Returns options with the camera turned to look at target. The position does not change.
withAltitude(double altitude) → FreeCameraOptions

Available on FreeCameraOptions, provided by the FreeCameraOptionsGeography extension

Returns options with the camera at altitude meters above sea level. The location and the orientation do not change.
withLocation(Point location, {double? altitude}) → FreeCameraOptions

Available on FreeCameraOptions, provided by the FreeCameraOptionsGeography extension

Returns options with the camera at the geographic location and altitude in meters above sea level.
withPitchBearing(double pitch, double bearing) → FreeCameraOptions

Available on FreeCameraOptions, provided by the FreeCameraOptionsGeography extension

Returns options with the camera turned to a pitch and a bearing in degrees. The position does not change.