Holds values for Map options.
More...
#include <map_options.hpp>
Holds values for Map options.
Definition at line 14 of file map_options.hpp.
◆ MapOptions() [1/2]
mbgl::MapOptions::MapOptions |
( |
| ) |
|
Constructs a MapOptions object with default values.
◆ ~MapOptions()
mbgl::MapOptions::~MapOptions |
( |
| ) |
|
◆ MapOptions() [2/2]
◆ constrainMode()
Gets the previously set (or default) constrain mode.
- Returns
- constrain mode.
◆ crossSourceCollisions()
bool mbgl::MapOptions::crossSourceCollisions |
( |
| ) |
const |
Gets the previously set (or default) crossSourceCollisions value.
- Returns
- true if ecross-source symbol collision detection enabled, false otherwise.
◆ mapMode()
MapMode mbgl::MapOptions::mapMode |
( |
| ) |
const |
Gets the previously set (or default) map mode.
- Returns
- Returns a mbgl::MapMode
◆ northOrientation()
Gets the previously set (or default) orientation.
- Returns
- Map orientation.
◆ pixelRatio()
float mbgl::MapOptions::pixelRatio |
( |
| ) |
const |
Gets the previously set (or default) pixel ratio value.
- Returns
- pixel ratio value.
◆ size()
Size mbgl::MapOptions::size |
( |
| ) |
const |
Gets the previously set size.
- Returns
- Size.
◆ viewportMode()
Gets the previously set (or default) viewport mode.
- Returns
- viewport mode.
◆ withConstrainMode()
Sets the map constrain mode. This can be used to limit the map to wrap around the globe horizontally. By default, it is set to HeightOnly.
- Parameters
-
- Returns
- MapOptions for chaining options together.
◆ withCrossSourceCollisions()
MapOptions& mbgl::MapOptions::withCrossSourceCollisions |
( |
bool |
enableCollisions | ) |
|
Specify whether to enable cross-source symbol collision detection or not. By default, it is set to true.
- Parameters
-
enableCollisions | true to enable, false to disable |
- Returns
- MapOptions for chaining options together.
◆ withMapMode()
Sets the map rendering mode. By default, it is set to Continuous so the map will render as data arrives from the network and react immediately to state changes.
- Parameters
-
- Returns
- MapOptions for chaining options together.
◆ withNorthOrientation()
Sets the orientation of the Map. By default, it is set to Upwards.
- Parameters
-
orientation | Orientation of the Map. |
- Returns
- reference to MapOptions for chaining options together.
◆ withPixelRatio()
MapOptions& mbgl::MapOptions::withPixelRatio |
( |
float |
ratio | ) |
|
Sets the custom pixel ratio. By default, it is set to 1.
- Parameters
-
- Returns
- reference to MapOptions for chaining options together.
◆ withSize()
Sets the size to resize the map object and renderer backend.
- Parameters
-
size_ | A size given in logical pixels. |
- Returns
- reference to MapOptions for chaining options together.
◆ withViewportMode()
Sets the viewport mode. This can be used to flip the vertical orientation of the map as some devices may use inverted orientation.
- Parameters
-
- Returns
- MapOptions for chaining options together.
The documentation for this class was generated from the following file:
- /home/runner/work/maplibre-native/maplibre-native/include/mbgl/map/map_options.hpp