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

#include <geo.hpp>

Public Types

enum  WrapMode : bool { Unwrapped , Wrapped }
 

Public Member Functions

 LatLng (double lat_=0, double lon_=0, WrapMode mode=Unwrapped)
 
double latitude () const
 
double longitude () const
 
LatLng wrapped () const
 
void wrap ()
 
void unwrapForShortestPath (const LatLng &end)
 
 LatLng (const CanonicalTileID &id)
 
 LatLng (const UnwrappedTileID &id)
 

Friends

bool operator== (const LatLng &a, const LatLng &b)
 
bool operator!= (const LatLng &a, const LatLng &b)
 

Detailed Description

Definition at line 24 of file geo.hpp.

Member Enumeration Documentation

◆ WrapMode

Enumerator
Unwrapped 
Wrapped 

Definition at line 30 of file geo.hpp.

Constructor & Destructor Documentation

◆ LatLng() [1/3]

mbgl::LatLng::LatLng ( double  lat_ = 0,
double  lon_ = 0,
WrapMode  mode = Unwrapped 
)
inline

Definition at line 32 of file geo.hpp.

◆ LatLng() [2/3]

mbgl::LatLng::LatLng ( const CanonicalTileID id)

◆ LatLng() [3/3]

mbgl::LatLng::LatLng ( const UnwrappedTileID id)

Member Function Documentation

◆ latitude()

double mbgl::LatLng::latitude ( ) const
inline

Definition at line 51 of file geo.hpp.

◆ longitude()

double mbgl::LatLng::longitude ( ) const
inline

Definition at line 52 of file geo.hpp.

◆ unwrapForShortestPath()

void mbgl::LatLng::unwrapForShortestPath ( const LatLng end)
inline

Definition at line 62 of file geo.hpp.

◆ wrap()

void mbgl::LatLng::wrap ( )
inline

Definition at line 56 of file geo.hpp.

◆ wrapped()

LatLng mbgl::LatLng::wrapped ( ) const
inline

Definition at line 54 of file geo.hpp.

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const LatLng a,
const LatLng b 
)
friend

Definition at line 77 of file geo.hpp.

◆ operator==

bool operator== ( const LatLng a,
const LatLng b 
)
friend

Definition at line 73 of file geo.hpp.


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