MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::CameraOptions Struct Reference

#include <camera.hpp>

Public Member Functions

CameraOptionswithCenter (const std::optional< LatLng > &o)
 
CameraOptionswithPadding (const std::optional< EdgeInsets > &p)
 
CameraOptionswithAnchor (const std::optional< ScreenCoordinate > &o)
 
CameraOptionswithZoom (const std::optional< double > &o)
 
CameraOptionswithBearing (const std::optional< double > &o)
 
CameraOptionswithPitch (const std::optional< double > &o)
 

Public Attributes

std::optional< LatLngcenter
 
std::optional< EdgeInsetspadding
 
std::optional< ScreenCoordinateanchor
 
std::optional< double > zoom
 
std::optional< double > bearing
 
std::optional< double > pitch
 

Detailed Description

Various options for describing the viewpoint of a map. All fields are optional. Anchor and center points are mutually exclusive, with preference for the center point when both are set.

Definition at line 19 of file camera.hpp.

Member Function Documentation

◆ withAnchor()

CameraOptions& mbgl::CameraOptions::withAnchor ( const std::optional< ScreenCoordinate > &  o)
inline

Definition at line 22 of file camera.hpp.

◆ withBearing()

CameraOptions& mbgl::CameraOptions::withBearing ( const std::optional< double > &  o)
inline

Definition at line 24 of file camera.hpp.

◆ withCenter()

CameraOptions& mbgl::CameraOptions::withCenter ( const std::optional< LatLng > &  o)
inline

Definition at line 20 of file camera.hpp.

◆ withPadding()

CameraOptions& mbgl::CameraOptions::withPadding ( const std::optional< EdgeInsets > &  p)
inline

Definition at line 21 of file camera.hpp.

◆ withPitch()

CameraOptions& mbgl::CameraOptions::withPitch ( const std::optional< double > &  o)
inline

Definition at line 25 of file camera.hpp.

◆ withZoom()

CameraOptions& mbgl::CameraOptions::withZoom ( const std::optional< double > &  o)
inline

Definition at line 23 of file camera.hpp.

Member Data Documentation

◆ anchor

std::optional<ScreenCoordinate> mbgl::CameraOptions::anchor

Point of reference for zoom and angle, assuming an origin at the top-left corner of the view.

Definition at line 36 of file camera.hpp.

◆ bearing

std::optional<double> mbgl::CameraOptions::bearing

Bearing, measured in degrees from true north. Wrapped to [0, 360).

Definition at line 43 of file camera.hpp.

◆ center

std::optional<LatLng> mbgl::CameraOptions::center

Coordinate at the center of the map.

Definition at line 28 of file camera.hpp.

◆ padding

std::optional<EdgeInsets> mbgl::CameraOptions::padding

Padding around the interior of the view that affects the frame of reference for center.

Definition at line 32 of file camera.hpp.

◆ pitch

std::optional<double> mbgl::CameraOptions::pitch

Pitch toward the horizon measured in degrees , with 0 deg resulting in a two-dimensional map.

Definition at line 47 of file camera.hpp.

◆ zoom

std::optional<double> mbgl::CameraOptions::zoom

Zero-based zoom level. Constrained to the minimum and maximum zoom levels.

Definition at line 40 of file camera.hpp.


The documentation for this struct was generated from the following file: