LuciadCPillar 2026.1.02
Loading...
Searching...
No Matches
luciad::ProjectedImageryLayer Class Referencefinal

A layer that visualizes projected imagery on the map. More...

#include <luciad/layers/projectedimagery/ProjectedImageryLayer.h>

Inheritance diagram for luciad::ProjectedImageryLayer:
luciad::Layer

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.

Detailed Description

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

Since
2026.1

Constructor & Destructor Documentation

◆ ~ProjectedImageryLayer()

luciad::ProjectedImageryLayer::~ProjectedImageryLayer ( )
override

Member Function Documentation

◆ addObserver()

void luciad::ProjectedImageryLayer::addObserver ( std::shared_ptr< ILayerObserver > layerObserver)
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.

Parameters
layerObserveran observer.
Exceptions
luciad::InvalidArgumentExceptionwhen the observer was already added.
luciad::NullArgumentExceptionwhen the observer is nullptr.

Implements luciad::Layer.

◆ asBuilder()

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.

Returns
a new builder based on this layer instance.

◆ getModel()

const std::shared_ptr< IProjectedImageryModel > & luciad::ProjectedImageryLayer::getModel ( ) const

Returns the projected imagery model associated with this layer.

Returns
the projected imagery model associated with this layer.

◆ getSelectedProjections()

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.

Returns
the projections to display, each with its blend weight.

◆ getStyle()

const ProjectedImageryStyle & luciad::ProjectedImageryLayer::getStyle ( ) const

Returns the style used for painting this layer.

Returns
the style used for painting this layer.

◆ getTitle()

const std::string & luciad::ProjectedImageryLayer::getTitle ( ) const
overridevirtual

Returns the layer's title.

Should be suitable for presenting to the user.

Returns
the layer's title, should be suitable for presenting to the user.

Implements luciad::Layer.

◆ isBusy()

bool luciad::ProjectedImageryLayer::isBusy ( ) const
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.

Returns
whether this layer is busy.
Since
2024.1

Implements luciad::Layer.

◆ isVisible()

bool luciad::ProjectedImageryLayer::isVisible ( ) const
overridevirtual

Returns whether this layer is visible.

Returns
whether this layer is visible.

Implements luciad::Layer.

◆ newBuilder()

Builder luciad::ProjectedImageryLayer::newBuilder ( )
static

Returns a new builder for creating a ProjectedImageryLayer.

Returns
a new builder.

◆ propertySelectedProjections()

const std::string & luciad::ProjectedImageryLayer::propertySelectedProjections ( )
static

Property name for the LayerEvent that is fired as a result of changing the layer's selected projections.

See also
setSelectedProjections

◆ propertyStyle()

const std::string & luciad::ProjectedImageryLayer::propertyStyle ( )
static

Property name for the LayerEvent that is fired as a result of changing the layer's style.

See also
setStyle

◆ removeObserver()

void luciad::ProjectedImageryLayer::removeObserver ( const std::shared_ptr< ILayerObserver > & layerObserver)
overridevirtual

Removes the given observer.

If the given observer was never added, an exception is thrown.

Parameters
layerObserveran observer.
Exceptions
luciad::InvalidArgumentExceptionwhen the observer is not known.
luciad::NullArgumentExceptionwhen the observer is nullptr.

Implements luciad::Layer.

◆ setSelectedProjections()

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.

Parameters
projectionsthe projections to display.

◆ setStyle()

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.

Parameters
stylethe new projected imagery style.

◆ setTitle()

void luciad::ProjectedImageryLayer::setTitle ( std::string title)
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.

Parameters
titlethe new title.

Implements luciad::Layer.

◆ setVisible()

void luciad::ProjectedImageryLayer::setVisible ( bool visible)
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.

Parameters
visiblethe new visibility.

Implements luciad::Layer.