|
LuciadCPillar 2026.1.02
|
Builder for the luciad::MbTilesFeatureLayer class. More...
#include <luciad/layers/mbtiles/MbTilesFeatureLayer.h>
Public Member Functions | |
| Builder (Builder &&other) noexcept | |
| Builder (const Builder &other) | |
| Copy constructor. | |
| ~Builder () | |
| std::shared_ptr< MbTilesFeatureLayer > | build () const |
| Returns a new layer, based on the properties set on this builder. | |
| Builder & | labeled (bool labeled) |
| Sets whether the layer should display labels initially. | |
| Builder & | model (std::shared_ptr< IFeatureTileModel > model) |
| Sets the feature tile model of the layer. | |
| Builder & | operator= (Builder other) noexcept |
| Builder & | style (std::string path) |
| Sets the style of the layer. | |
| Builder & | title (std::string title) |
| Sets the title to use for the layer. | |
| Builder & | visible (bool visible) |
| Sets whether the layer should be visible initially. | |
Builder for the luciad::MbTilesFeatureLayer class.
| luciad::MbTilesFeatureLayer::Builder::Builder | ( | const Builder & | other | ) |
Copy constructor.
| other | the builder to copy. |
|
noexcept |
| luciad::MbTilesFeatureLayer::Builder::~Builder | ( | ) |
| std::shared_ptr< MbTilesFeatureLayer > luciad::MbTilesFeatureLayer::Builder::build | ( | ) | const |
Returns a new layer, based on the properties set on this builder.
| luciad::LogicException | If not all mandatory parameters are set. |
| luciad::IOException | If decoding the style fails. |
| Builder & luciad::MbTilesFeatureLayer::Builder::labeled | ( | bool | labeled | ) |
Sets whether the layer should display labels initially.
The default is true.
| labeled | whether the layer should display labels initially. |
MbTilesFeatureLayer::setLabeled | Builder & luciad::MbTilesFeatureLayer::Builder::model | ( | std::shared_ptr< IFeatureTileModel > | model | ) |
Sets the feature tile model of the layer.
Calling this function is mandatory.
| model | the feature tile model of the layer. Cannot be nullptr. |
| luciad::NullArgumentException | when the given model is nullptr. |
| Builder & luciad::MbTilesFeatureLayer::Builder::style | ( | std::string | path | ) |
Sets the style of the layer.
If not set, a default style is used instead. This is either:
FeatureLayer.*This is an extension on the MBTiles format that was introduced in LuciadFusion 2026.1. It allows the dataset to point to a style file path by containing a "style" property.
The currently supported format is the Mapbox style format (see the Mapbox style specification). Only the sections that are relevant for styling MBTiles are supported, namely:
When the Mapbox style contains a background layer style, it is applied on the extent of the feature tile data set. Use of interpolation based on zoom level is not supported for the background. The background at zoom level 0 is used.
Note that not all types, expressions and style properties defined by the Mapbox style format are supported. When an unsupported option is used in the style, that option is ignored and if appropriate, a fallback value is used instead.
The following is currently supported:
| path | the path to a style file. Can be a URL or a file path to a JSON file. |
| Builder & luciad::MbTilesFeatureLayer::Builder::title | ( | std::string | title | ) |
Sets the title to use for the layer.
If not set, the title from the ModelMetadata is used.
| title | the title for the layer. |
| Builder & luciad::MbTilesFeatureLayer::Builder::visible | ( | bool | visible | ) |
Sets whether the layer should be visible initially.
Default is true.
| visible | the visibility. |