|
LuciadCPillar 2026.1.02
|
A layer that visualizes projected imagery on the map. More...
#include <luciad/layers/projectedimagery/ProjectedImageryLayer.h>
Classes | |
| class | Builder |
| Builder for creating a ProjectedImageryLayer. More... | |
Public Member Functions | |
| ~ProjectedImageryLayer () override | |
| void | addObserver (std::shared_ptr< ILayerObserver > layerObserver) override |
| Adds an observer that allows to receive change events from this layer. | |
| Builder | asBuilder () |
| Returns a new builder based on this layer instance. | |
| const std::shared_ptr< IProjectedImageryModel > & | getModel () const |
| Returns the projected imagery model associated with this layer. | |
| const std::vector< SelectedProjection > & | getSelectedProjections () const |
| Returns the projections to display, each with its blend weight. | |
| const ProjectedImageryStyle & | getStyle () const |
| Returns the style used for painting this layer. | |
| 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 | isVisible () const override |
| Returns whether this layer is visible. | |
| void | removeObserver (const std::shared_ptr< ILayerObserver > &layerObserver) override |
| Removes the given observer. | |
| void | setSelectedProjections (std::vector< SelectedProjection > projections) |
| Sets the projections to display, each with its blend weight. | |
| void | setStyle (ProjectedImageryStyle style) |
| Sets the style used for painting this 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 ProjectedImageryLayer. | |
| static const std::string & | propertySelectedProjections () |
| Property name for the LayerEvent that is fired as a result of changing the layer's selected projections. | |
| static const std::string & | propertyStyle () |
| 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 that visualizes projected imagery on the map.
A ProjectedImageryLayer takes an IProjectedImageryModel and projects the imagery of its selected projections onto the map from the virtual camera position and orientation described by each projection. The model may hold a single projection (for example a live video camera) or many (for example a set of panoramas).
Use ProjectedImageryLayer::newBuilder to create an instance.
The layer subscribes to the model as long as it is part of the map's layer list. Removing the layer from the map unsubscribes it from the model, so that the model can safely outlive the layer.
Related article: Projecting images, video and panoramas onto the map
|
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::ProjectedImageryLayer::asBuilder | ( | ) |
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< IProjectedImageryModel > & luciad::ProjectedImageryLayer::getModel | ( | ) | const |
Returns the projected imagery model associated with this layer.
| const std::vector< SelectedProjection > & luciad::ProjectedImageryLayer::getSelectedProjections | ( | ) | const |
Returns the projections to display, each with its blend weight.
Several projections may be displayed at once so that, for example, a navigation controller can cross-fade between neighbors by animating the weights. An empty list displays nothing.
| const ProjectedImageryStyle & luciad::ProjectedImageryLayer::getStyle | ( | ) | const |
Returns the style used for painting this layer.
|
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.
|
overridevirtual |
Returns whether this layer is visible.
Implements luciad::Layer.
|
static |
Returns a new builder for creating a ProjectedImageryLayer.
|
static |
Property name for the LayerEvent that is fired as a result of changing the layer's selected projections.
|
static |
Property name for the LayerEvent that is fired as a result of changing the layer's style.
|
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::ProjectedImageryLayer::setSelectedProjections | ( | std::vector< SelectedProjection > | projections | ) |
Sets the projections to display, each with its blend weight.
If the new projections differ from the current ones, a LayerEvent with the property name propertySelectedProjections is delivered to the observers.
| projections | the projections to display. |
| void luciad::ProjectedImageryLayer::setStyle | ( | ProjectedImageryStyle | style | ) |
Sets the style used for painting this layer.
A LayerEvent with the property name propertyStyle is delivered to the observers.
| style | the new projected imagery style. |
|
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.