|
LuciadCPillar 2026.1.02
|
A layer for feature tile models. More...
#include <luciad/layers/mbtiles/MbTilesFeatureLayer.h>
Classes | |
| class | Builder |
| Builder for the luciad::MbTilesFeatureLayer class. More... | |
Public Member Functions | |
| ~MbTilesFeatureLayer () override | |
| void | addObserver (std::shared_ptr< ILayerObserver > layerObserver) override |
| Adds an observer that allows to receive change events from this layer. | |
| Builder | asBuilder () const |
| Returns a new builder based on this layer instance. | |
| const std::shared_ptr< IFeatureTileModel > & | getModel () const |
| Returns the layer's model, which provides the feature tiles to present. | |
| const std::string & | getTitle () const override |
| Returns the layer's title. | |
| bool | isBusy () const override |
| Returns whether this layer is busy loading data, rendering, loading attributions, or anything else. | |
| bool | isLabeled () const |
| Returns whether this layer displays labels. | |
| bool | isVisible () const override |
| Returns whether this layer is visible. | |
| void | removeObserver (const std::shared_ptr< ILayerObserver > &layerObserver) override |
| Removes the given observer. | |
| void | setLabeled (bool labeled) |
| Sets whether this layer displays labels. | |
| void | setStyle (std::string path) |
| Sets the style of the layer. | |
| void | setTitle (std::string title) override |
| Sets the layer's title. | |
| void | setVisible (bool visible) override |
| Sets whether this layer is visible. | |
| Public Member Functions inherited from luciad::Layer | |
| Layer () | |
| Default constructor. | |
| virtual | ~Layer ()=default |
| virtual LayerId | getId () const |
| Returns the layer's unique id. | |
Static Public Member Functions | |
| static Builder | newBuilder () |
| Returns a new builder for creating a MbTilesFeatureLayer. | |
| static const std::string & | propertyLabeled () |
| Returns the property name for the LayerEvent that is fired as a result of changing the layer's labeled flag. | |
| static const std::string & | propertyStyle () |
| Returns the property name for the LayerEvent that is fired as a result of changing the layer's style. | |
| Static Public Member Functions inherited from luciad::Layer | |
| static const std::string & | propertyBusy () |
| Property name for the LayerEvent that is fired as a result of the layer's busy flag changing. | |
| static const std::string & | propertyTitle () |
| Property name for the LayerEvent that is fired as a result of changing the layer's title. | |
| static const std::string & | propertyVisible () |
| Property name for the LayerEvent that is fired as a result of changing the layer's visible flag. | |
A layer for feature tile models.
Use luciad::MbTilesFeatureLayer::newBuilder to create a feature tile layer instance.
|
override |
|
overridevirtual |
Adds an observer that allows to receive change events from this layer.
Adding the same observer twice is forbidden, and will cause an exception to be thrown.
| layerObserver | an observer. |
| luciad::InvalidArgumentException | when the observer was already added. |
| luciad::NullArgumentException | when the observer is nullptr. |
Implements luciad::Layer.
| Builder luciad::MbTilesFeatureLayer::asBuilder | ( | ) | const |
Returns a new builder based on this layer instance.
You can use this builder, for example, to create a copy of this layer.
Note that observers will not be transferred to a new layer.
| const std::shared_ptr< IFeatureTileModel > & luciad::MbTilesFeatureLayer::getModel | ( | ) | const |
Returns the layer's model, which provides the feature tiles to present.
|
overridevirtual |
Returns the layer's title.
Should be suitable for presenting to the user.
Implements luciad::Layer.
|
overridevirtual |
Returns whether this layer is busy loading data, rendering, loading attributions, or anything else.
When this property changes, a LayerEvent is delivered to the observers with the property name propertyBusy.
Note: when the map is moving around it can be that the layer is repeatedly loading new data, but does this fast enough that it is done by the time new data is needed, resulting in a repeatedly changing busyness state.
Implements luciad::Layer.
| bool luciad::MbTilesFeatureLayer::isLabeled | ( | ) | const |
Returns whether this layer displays labels.
|
overridevirtual |
Returns whether this layer is visible.
Implements luciad::Layer.
|
static |
Returns a new builder for creating a MbTilesFeatureLayer.
|
static |
Returns the property name for the LayerEvent that is fired as a result of changing the layer's labeled flag.
setLabeled
|
static |
Returns the property name for the LayerEvent that is fired as a result of changing the layer's style.
setStyle
|
overridevirtual |
Removes the given observer.
If the given observer was never added, an exception is thrown.
| layerObserver | an observer. |
| luciad::InvalidArgumentException | when the observer is not known. |
| luciad::NullArgumentException | when the observer is nullptr. |
Implements luciad::Layer.
| void luciad::MbTilesFeatureLayer::setLabeled | ( | bool | labeled | ) |
Sets whether this layer displays labels.
Note that both icons and text (i.e. Mapbox symbols) are considered labels.
| labeled | true to enable labels. |
| void luciad::MbTilesFeatureLayer::setStyle | ( | std::string | path | ) |
Sets the style of the layer.
Calling this method results in new model queries and a full reload of all visible tiles with the new style.
When setting a new style, a LayerEvent is delivered to the observers with the property name MbTilesFeatureLayer::propertyStyle.
| path | the path to a style file. Can be a URL or a file path to a JSON file. |
| luciad::IOException | If decoding the style fails. |
MbTilesFeatureLayer::Builder::style for the list of supported styles.
|
overridevirtual |
Sets the layer's title.
Should be suitable for presenting to the user.
If the new title is indeed different from the old one, a LayerEvent is delivered to the observers with the property name PropertyTitle.
| title | the new title. |
Implements luciad::Layer.
|
overridevirtual |
Sets whether this layer is visible.
Changes this layer's visibility. If the new visibility is different from the old one, a LayerEvent is delivered to the observers with the property name PropertyVisible.
| visible | the new visibility. |
Implements luciad::Layer.