Struct Camera
- Namespace
- Maplibre.NativeFfi
- Assembly
- Maplibre.NativeFfi.dll
A map's whole camera.
public readonly record struct Camera : IEquatable<Camera>
- Implements
- Inherited Members
Remarks
See mln_camera in the C API reference.
Constructors
Camera(LatLng, double, EdgeInsets, double, double, double, double, double)
A map's whole camera.
public Camera(LatLng Center, double CenterAltitude, EdgeInsets Padding, double Zoom, double Bearing, double Pitch, double Roll, double FieldOfView)
Parameters
CenterLatLngCenterAltitudedoubleThe altitude of the center, in meters above sea level.
PaddingEdgeInsetsInsets from the map's edges. The camera centers within the rest.
ZoomdoubleBearingdoubleThe rotation from north, in degrees.
PitchdoubleThe tilt toward the horizon, in degrees. 0 looks straight down.
RolldoubleThe roll, in degrees.
FieldOfViewdoubleThe vertical field of view, in degrees.
Remarks
See mln_camera in the C API reference.
Properties
Bearing
The rotation from north, in degrees.
public double Bearing { get; init; }
Property Value
Center
public LatLng Center { get; init; }
Property Value
CenterAltitude
The altitude of the center, in meters above sea level.
public double CenterAltitude { get; init; }
Property Value
FieldOfView
The vertical field of view, in degrees.
public double FieldOfView { get; init; }
Property Value
Padding
Insets from the map's edges. The camera centers within the rest.
public EdgeInsets Padding { get; init; }
Property Value
Pitch
The tilt toward the horizon, in degrees. 0 looks straight down.
public double Pitch { get; init; }
Property Value
Roll
The roll, in degrees.
public double Roll { get; init; }
Property Value
Zoom
public double Zoom { get; init; }
Property Value
Methods
ToOptions()
Converts this Camera to CameraOptions that set each of its
members.
public CameraOptions ToOptions()