MapLibre Native Core
|
Holds values for tile server options. More...
#include <tile_server_options.hpp>
Public Member Functions | |
TileServerOptions () | |
Constructs a TileServerOptions object with default values. More... | |
~TileServerOptions () | |
TileServerOptions (TileServerOptions &&options) noexcept | |
TileServerOptions & | operator= (TileServerOptions &&options) noexcept |
TileServerOptions (const TileServerOptions &) | |
TileServerOptions | clone () const |
TileServerOptions & | withBaseURL (std::string baseURL) |
Sets the API base URL. More... | |
const std::string & | baseURL () const |
Gets the previously set (or default) API base URL. More... | |
TileServerOptions & | withUriSchemeAlias (std::string alias) |
Sets the scheme alias for the tile server. For example maptiler:// for MapTiler. More... | |
const std::string & | uriSchemeAlias () const |
Gets the previously set (or default) tile server URI alias. More... | |
TileServerOptions & | withSourceTemplate (std::string sourceTemplate, std::string domainName, std::optional< std::string > versionPrefix) |
Sets the template for sources. More... | |
const std::string & | sourceTemplate () const |
Gets the previously set (or default) source template. More... | |
const std::string & | sourceDomainName () const |
Gets the previously set (or default) source domain name. More... | |
const std::optional< std::string > & | sourceVersionPrefix () const |
Gets the previously set (or default) version prefix. More... | |
TileServerOptions & | withStyleTemplate (std::string styleTemplate, std::string domainName, std::optional< std::string > versionPrefix) |
Sets the template for styles. More... | |
const std::string & | styleTemplate () const |
Gets the previously set (or default) style template. More... | |
const std::string & | styleDomainName () const |
Gets the previously set (or default) style domain name. More... | |
const std::optional< std::string > & | styleVersionPrefix () const |
Gets the previously set (or default) version prefix. More... | |
TileServerOptions & | withSpritesTemplate (std::string spritesTemplate, std::string domainName, std::optional< std::string > versionPrefix) |
Sets the template for sprites. More... | |
const std::string & | spritesTemplate () const |
Gets the previously set (or default) sprites template. More... | |
const std::string & | spritesDomainName () const |
Gets the previously set (or default) sprites domain name. More... | |
const std::optional< std::string > & | spritesVersionPrefix () const |
Gets the previously set (or default) version prefix. More... | |
TileServerOptions & | withGlyphsTemplate (std::string glyphsTemplate, std::string domainName, std::optional< std::string > versionPrefix) |
Sets the template for glyphs. More... | |
const std::string & | glyphsTemplate () const |
Gets the previously set (or default) glyphs template. More... | |
const std::string & | glyphsDomainName () const |
Gets the previously set (or default) glyphs domain name. More... | |
const std::optional< std::string > & | glyphsVersionPrefix () const |
Gets the previously set (or default) version prefix. More... | |
TileServerOptions & | withTileTemplate (std::string tileTemplate, std::string domainName, std::optional< std::string > versionPrefix) |
Sets the template for tiles. More... | |
const std::string & | tileTemplate () const |
Gets the previously set (or default) tile template. More... | |
const std::string & | tileDomainName () const |
Gets the previously set (or default) tile domain name. More... | |
const std::optional< std::string > & | tileVersionPrefix () const |
Gets the previously set (or default) version prefix. More... | |
TileServerOptions & | withApiKeyParameterName (std::string apiKeyParameterName) |
Sets the access token parameter name. More... | |
const std::string & | apiKeyParameterName () const |
Gets the previously set (or default) apiKeyParameterName. More... | |
TileServerOptions & | setRequiresApiKey (bool apiKeyRequired) |
bool | requiresApiKey () const |
Whether the tile server requires API key. More... | |
const std::vector< mbgl::util::DefaultStyle > | defaultStyles () const |
Gets the default styles. More... | |
TileServerOptions & | withDefaultStyles (std::vector< mbgl::util::DefaultStyle > styles) |
Sets the collection default styles. More... | |
TileServerOptions & | withDefaultStyle (std::string defaultStyle) |
Sets the default style by name. The style name must exists in defaultStyles collection. More... | |
const std::string & | defaultStyle () const |
Get the default style name. More... | |
Static Public Member Functions | |
static TileServerOptions | DefaultConfiguration () |
Get the default configuration. More... | |
static TileServerOptions | MapLibreConfiguration () |
Get the tile server options configured for MapLibre. More... | |
static TileServerOptions | MapboxConfiguration () |
Get the tile server options configured for Mapbox. More... | |
static TileServerOptions | MapTilerConfiguration () |
Get the tile server options configured for MapTiler. More... | |
Holds values for tile server options.
Definition at line 15 of file tile_server_options.hpp.
|
explicit |
Constructs a TileServerOptions object with default values.
mbgl::TileServerOptions::~TileServerOptions | ( | ) |
|
noexcept |
mbgl::TileServerOptions::TileServerOptions | ( | const TileServerOptions & | ) |
const std::string& mbgl::TileServerOptions::apiKeyParameterName | ( | ) | const |
Gets the previously set (or default) apiKeyParameterName.
const std::string& mbgl::TileServerOptions::baseURL | ( | ) | const |
Gets the previously set (or default) API base URL.
TileServerOptions mbgl::TileServerOptions::clone | ( | ) | const |
|
static |
Get the default configuration.
const std::string& mbgl::TileServerOptions::defaultStyle | ( | ) | const |
Get the default style name.
const std::vector<mbgl::util::DefaultStyle> mbgl::TileServerOptions::defaultStyles | ( | ) | const |
Gets the default styles.
const std::string& mbgl::TileServerOptions::glyphsDomainName | ( | ) | const |
Gets the previously set (or default) glyphs domain name.
const std::string& mbgl::TileServerOptions::glyphsTemplate | ( | ) | const |
Gets the previously set (or default) glyphs template.
const std::optional<std::string>& mbgl::TileServerOptions::glyphsVersionPrefix | ( | ) | const |
Gets the previously set (or default) version prefix.
|
static |
Get the tile server options configured for Mapbox.
|
static |
Get the tile server options configured for MapLibre.
|
static |
Get the tile server options configured for MapTiler.
|
noexcept |
bool mbgl::TileServerOptions::requiresApiKey | ( | ) | const |
Whether the tile server requires API key.
TileServerOptions& mbgl::TileServerOptions::setRequiresApiKey | ( | bool | apiKeyRequired | ) |
const std::string& mbgl::TileServerOptions::sourceDomainName | ( | ) | const |
Gets the previously set (or default) source domain name.
const std::string& mbgl::TileServerOptions::sourceTemplate | ( | ) | const |
Gets the previously set (or default) source template.
const std::optional<std::string>& mbgl::TileServerOptions::sourceVersionPrefix | ( | ) | const |
Gets the previously set (or default) version prefix.
const std::string& mbgl::TileServerOptions::spritesDomainName | ( | ) | const |
Gets the previously set (or default) sprites domain name.
const std::string& mbgl::TileServerOptions::spritesTemplate | ( | ) | const |
Gets the previously set (or default) sprites template.
const std::optional<std::string>& mbgl::TileServerOptions::spritesVersionPrefix | ( | ) | const |
Gets the previously set (or default) version prefix.
const std::string& mbgl::TileServerOptions::styleDomainName | ( | ) | const |
Gets the previously set (or default) style domain name.
const std::string& mbgl::TileServerOptions::styleTemplate | ( | ) | const |
Gets the previously set (or default) style template.
const std::optional<std::string>& mbgl::TileServerOptions::styleVersionPrefix | ( | ) | const |
Gets the previously set (or default) version prefix.
const std::string& mbgl::TileServerOptions::tileDomainName | ( | ) | const |
Gets the previously set (or default) tile domain name.
const std::string& mbgl::TileServerOptions::tileTemplate | ( | ) | const |
Gets the previously set (or default) tile template.
const std::optional<std::string>& mbgl::TileServerOptions::tileVersionPrefix | ( | ) | const |
Gets the previously set (or default) version prefix.
const std::string& mbgl::TileServerOptions::uriSchemeAlias | ( | ) | const |
Gets the previously set (or default) tile server URI alias.
TileServerOptions& mbgl::TileServerOptions::withApiKeyParameterName | ( | std::string | apiKeyParameterName | ) |
Sets the access token parameter name.
apiKeyParameterName | The parameter name. |
TileServerOptions& mbgl::TileServerOptions::withBaseURL | ( | std::string | baseURL | ) |
Sets the API base URL.
baseURL | API base URL. |
TileServerOptions& mbgl::TileServerOptions::withDefaultStyle | ( | std::string | defaultStyle | ) |
Sets the default style by name. The style name must exists in defaultStyles collection.
defaultStyle | The style name |
TileServerOptions& mbgl::TileServerOptions::withDefaultStyles | ( | std::vector< mbgl::util::DefaultStyle > | styles | ) |
Sets the collection default styles.
styles | The style set. |
TileServerOptions& mbgl::TileServerOptions::withGlyphsTemplate | ( | std::string | glyphsTemplate, |
std::string | domainName, | ||
std::optional< std::string > | versionPrefix | ||
) |
Sets the template for glyphs.
glyphsTemplate | The glyphs template. |
domainName | If set, the URL domain must contain the specified string to be matched as canonical glyphs URL . |
TileServerOptions& mbgl::TileServerOptions::withSourceTemplate | ( | std::string | sourceTemplate, |
std::string | domainName, | ||
std::optional< std::string > | versionPrefix | ||
) |
Sets the template for sources.
sourceTemplate | The source template. |
domainName | The domain name. |
TileServerOptions& mbgl::TileServerOptions::withSpritesTemplate | ( | std::string | spritesTemplate, |
std::string | domainName, | ||
std::optional< std::string > | versionPrefix | ||
) |
Sets the template for sprites.
domainName | If set, the URL domain must contain the specified string to be matched as canonical sprite URL . |
spritesTemplate | The sprites template. |
TileServerOptions& mbgl::TileServerOptions::withStyleTemplate | ( | std::string | styleTemplate, |
std::string | domainName, | ||
std::optional< std::string > | versionPrefix | ||
) |
Sets the template for styles.
styleTemplate | The style template. |
domainName | If set, the URL domain must contain the specified string to be matched as canonical style URL . |
TileServerOptions& mbgl::TileServerOptions::withTileTemplate | ( | std::string | tileTemplate, |
std::string | domainName, | ||
std::optional< std::string > | versionPrefix | ||
) |
Sets the template for tiles.
tileTemplate | The tile template. |
domainName | If set, the URL domain must contain the specified string to be matched as canonical tile URL . |
TileServerOptions& mbgl::TileServerOptions::withUriSchemeAlias | ( | std::string | alias | ) |
Sets the scheme alias for the tile server. For example maptiler:// for MapTiler.
alias | The URI alias. |