Builder for the luciad::FeatureLayer class.
More...
#include <luciad/layers/features/FeatureLayer.h>
◆ Builder() [1/2]
luciad::FeatureLayer::Builder::Builder |
( |
const Builder & |
other | ) |
|
◆ Builder() [2/2]
luciad::FeatureLayer::Builder::Builder |
( |
Builder && |
other | ) |
|
|
noexcept |
◆ ~Builder()
luciad::FeatureLayer::Builder::~Builder |
( |
| ) |
|
◆ build()
std::shared_ptr< FeatureLayer > luciad::FeatureLayer::Builder::build |
( |
| ) |
const |
Returns a new layer, based on the properties set on this builder.
- Returns
- a new layer, based on the properties set on this builder.
- Exceptions
-
luciad::LogicException | If not all mandatory parameters are set. If no painter is set and the feature model contains at least one feature data type without a geometry. |
◆ editable()
Builder & luciad::FeatureLayer::Builder::editable |
( |
bool |
editable | ) |
|
Sets whether the layer should be editable initially.
When an edit configuration is set
, the default is true. When no edit configuration is set, the default is false.
When this method is called with true
as parameter, and no edit configuration is edit set
, a default edit configuration will be used. This default configuration enables editing for all features, using a default handles provider
.
Refer to editConfiguration
for enabling editing capabilities.
- Parameters
-
editable | the edit capability. |
- Returns
- this builder.
- See also
FeatureLayer::setEditable
for more info.
- Since
- 2020.1
◆ editConfiguration()
Enables editing capabilities using the given IFeatureEditConfiguration
.
If not set, editing will not be supported, and FeatureLayer::getEditConfiguration
will return nullptr
. If set, editing will be enabled
by default.
Additional configuration for editing can be done using:
- Parameters
-
editConfiguration | the feature edit configuration used to edit the feature model. Cannot be nullptr . |
- Returns
- this builder.
- Since
- 2020.1
- Exceptions
-
◆ editCreateGeometryProvider()
Provides the edit/create geometry provider for a Feature.
This geometry provider determines using which geometry a Feature can be edited or created, and how to apply this geometry back on the Feature. This implementation is for example used by FeatureHandlesProvider
, and by Creator
.
Calling this method is optional. When this method is not called, a default implementation will be used. This default implementation assumes that
- Parameters
-
geometryProvider | the edit geometry provider for the current Feature. Cannot be nullptr . |
- Returns
- this
- Since
- 2020.1
- Exceptions
-
◆ labeled()
Builder & luciad::FeatureLayer::Builder::labeled |
( |
bool |
labeled | ) |
|
Sets whether the layer should display labels initially.
The default is true.
- Returns
- this builder.
- Parameters
-
labeled | whether the layer should display labels initially. |
- See also
FeatureLayer::setLabeled
- Since
- 2020.2
◆ loadingStrategy()
Sets the FeatureLayerLoadingStrategy
to use.
This method is optional. If a loading strategy is not explicitly configured, the LoadSpatially
strategy is used. It tries to use the LoadSpatially
strategy first. If that strategy is not supported for the layer's model, the LoadEverything
strategy is used as fallback.
- Parameters
-
loadingStrategy | the loading strategy to use. |
- Returns
- this builder
- Since
- 2023.0.02
◆ model()
Sets the feature model of the layer.
Calling this function is mandatory.
- Parameters
-
model | the feature model of the layer. Cannot be nullptr . |
- Returns
- this builder.
- Exceptions
-
◆ operator=()
◆ painter()
Sets the IFeaturePainter
to use.
If not set, a default painter will be used. The default painter relies on the feature model having all of its feature data types containing a geometry annotation.
- Parameters
-
featurePainter | the feature painter used to paint the feature model. Cannot be nullptr . |
- Returns
- this builder.
- Exceptions
-
◆ queryable()
Builder & luciad::FeatureLayer::Builder::queryable |
( |
bool |
queryable | ) |
|
◆ queryConfiguration()
Sets the query configuration to use.
The query configuration determines which features to load based on the current map's scale. If not set, a default configuration will be used that always loads all features.
- Parameters
-
configuration | the query configuration. Cannot be nullptr . |
- Returns
- this builder
- Exceptions
-
◆ title()
Builder & luciad::FeatureLayer::Builder::title |
( |
std::string |
title | ) |
|
Sets the title to use for the layer.
If not set, the title from the ModelMetadata is used.
- Parameters
-
title | the title for the layer. |
- Returns
- this builder.
◆ visible()
Builder & luciad::FeatureLayer::Builder::visible |
( |
bool |
visible | ) |
|
Sets whether the layer should be visible initially.
Default is true
.
- Parameters
-
- Returns
- this builder.