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

#include <geo.hpp>

Public Member Functions

 LatLngBounds ()
 
 LatLngBounds (const CanonicalTileID &)
 
bool valid () const
 
double south () const
 
double west () const
 
double north () const
 
double east () const
 
LatLng southwest () const
 
LatLng northeast () const
 
LatLng southeast () const
 
LatLng northwest () const
 
LatLng center () const
 
LatLng constrain (const LatLng &p) const
 
void extend (const LatLng &point)
 
void extend (const LatLngBounds &bounds)
 
bool isEmpty () const
 
bool crossesAntimeridian () const
 
bool contains (const CanonicalTileID &tileID) const
 
bool contains (const LatLng &point, LatLng::WrapMode wrap=LatLng::Unwrapped) const
 
bool contains (const LatLngBounds &area, LatLng::WrapMode wrap=LatLng::Unwrapped) const
 
bool intersects (LatLngBounds area, LatLng::WrapMode wrap=LatLng::Unwrapped) const
 

Static Public Member Functions

static LatLngBounds world ()
 
static LatLngBounds singleton (const LatLng &a)
 
static LatLngBounds hull (const LatLng &a, const LatLng &b)
 
static LatLngBounds empty ()
 

Friends

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

Detailed Description

Definition at line 82 of file geo.hpp.

Constructor & Destructor Documentation

◆ LatLngBounds() [1/2]

mbgl::LatLngBounds::LatLngBounds ( )
inline

Construct an infinite bound, a bound for which the constrain method returns its input unmodified.

Note: this is different than LatLngBounds::world() since arbitrary unwrapped coordinates are also inside the bounds.

Definition at line 109 of file geo.hpp.

◆ LatLngBounds() [2/2]

mbgl::LatLngBounds::LatLngBounds ( const CanonicalTileID )

Member Function Documentation

◆ center()

LatLng mbgl::LatLngBounds::center ( ) const
inline

Definition at line 128 of file geo.hpp.

◆ constrain()

LatLng mbgl::LatLngBounds::constrain ( const LatLng p) const

◆ contains() [1/3]

bool mbgl::LatLngBounds::contains ( const CanonicalTileID tileID) const

◆ contains() [2/3]

bool mbgl::LatLngBounds::contains ( const LatLng point,
LatLng::WrapMode  wrap = LatLng::Unwrapped 
) const

◆ contains() [3/3]

bool mbgl::LatLngBounds::contains ( const LatLngBounds area,
LatLng::WrapMode  wrap = LatLng::Unwrapped 
) const

◆ crossesAntimeridian()

bool mbgl::LatLngBounds::crossesAntimeridian ( ) const
inline

Definition at line 149 of file geo.hpp.

◆ east()

double mbgl::LatLngBounds::east ( ) const
inline

Definition at line 121 of file geo.hpp.

◆ empty()

static LatLngBounds mbgl::LatLngBounds::empty ( )
inlinestatic

Definition at line 98 of file geo.hpp.

◆ extend() [1/2]

void mbgl::LatLngBounds::extend ( const LatLng point)
inline

Definition at line 132 of file geo.hpp.

◆ extend() [2/2]

void mbgl::LatLngBounds::extend ( const LatLngBounds bounds)
inline

Definition at line 139 of file geo.hpp.

◆ hull()

static LatLngBounds mbgl::LatLngBounds::hull ( const LatLng a,
const LatLng b 
)
inlinestatic

Definition at line 91 of file geo.hpp.

◆ intersects()

bool mbgl::LatLngBounds::intersects ( LatLngBounds  area,
LatLng::WrapMode  wrap = LatLng::Unwrapped 
) const

◆ isEmpty()

bool mbgl::LatLngBounds::isEmpty ( ) const
inline

Definition at line 144 of file geo.hpp.

◆ north()

double mbgl::LatLngBounds::north ( ) const
inline

Definition at line 120 of file geo.hpp.

◆ northeast()

LatLng mbgl::LatLngBounds::northeast ( ) const
inline

Definition at line 124 of file geo.hpp.

◆ northwest()

LatLng mbgl::LatLngBounds::northwest ( ) const
inline

Definition at line 126 of file geo.hpp.

◆ singleton()

static LatLngBounds mbgl::LatLngBounds::singleton ( const LatLng a)
inlinestatic

Definition at line 88 of file geo.hpp.

◆ south()

double mbgl::LatLngBounds::south ( ) const
inline

Definition at line 118 of file geo.hpp.

◆ southeast()

LatLng mbgl::LatLngBounds::southeast ( ) const
inline

Definition at line 125 of file geo.hpp.

◆ southwest()

LatLng mbgl::LatLngBounds::southwest ( ) const
inline

Definition at line 123 of file geo.hpp.

◆ valid()

bool mbgl::LatLngBounds::valid ( ) const
inline

Definition at line 114 of file geo.hpp.

◆ west()

double mbgl::LatLngBounds::west ( ) const
inline

Definition at line 119 of file geo.hpp.

◆ world()

static LatLngBounds mbgl::LatLngBounds::world ( )
inlinestatic

Definition at line 85 of file geo.hpp.

Friends And Related Function Documentation

◆ operator!=

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

Definition at line 173 of file geo.hpp.

◆ operator==

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

Definition at line 169 of file geo.hpp.


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