Maps SDK for C++ 1.0.0
Loading...
Searching...
No Matches
gem::MapViewOverlayCollection Class Reference

Read-only collection of overlays attached to a MapView. More...

Inheritance diagram for gem::MapViewOverlayCollection:
Collaboration diagram for gem::MapViewOverlayCollection:

Public Member Functions

MapViewOverlayCollectionsetRenderSettingsByUid (int uid, const OverlayRenderSettings &settings) noexcept
 Set overlay render settings.
OverlayRenderSettings getRenderSettingsByUid (int uid) const noexcept
 Get rendering settings for the given overlay.
int size () const noexcept
 Get the number of overlay datasets in this collection.
const OverlayInfoRef getOverlayAt (int index) const noexcept
 Get the overlay at the specified index.
const OverlayInfoRef getOverlayByUid (int overlayUid) const noexcept
 Get the overlay having the specified UID.
bool contains (int overlayId) const noexcept
 Check if overlay is added to the collection.
bool contains (int overlayId, int categoryId) const noexcept
 Check if overlay category is added to the collection.
template<typename TCollector>
bool iterateOverlays (TCollector collector) const
 Iterate all overlays in the collection.
template<typename TCollector>
bool iterateOverlaysAndCategories (TCollector collector) const
 Iterate all overlays & categories in the collection.

Detailed Description

Read-only collection of overlays attached to a MapView.

Implements share-read / write Api object over IOverlayCollection. Provides access to overlays currently present in a MapView, allowing applications to query and iterate overlay elements without modification.

Member Function Documentation

◆ contains() [1/2]

bool gem::OverlayCollection::contains ( int overlayId) const
inlinenoexceptinherited

Check if overlay is added to the collection.

Parameters
[in]overlayIdThe overlay id. The list of available overlays can be obtained by using OverlayService
Returns
True if overlay is in the collection, false otherwise

◆ contains() [2/2]

bool gem::OverlayCollection::contains ( int overlayId,
int categoryId ) const
inlinenoexceptinherited

Check if overlay category is added to the collection.

Parameters
[in]overlayIdThe overlay id. The list of available overlays can be obtained by using OverlayService
[in]categoryIdThe overlay category id in OverlayInfo.getCategories result list
Returns
True if overlay category is in the collection, false otherwise

◆ getOverlayAt()

const OverlayInfoRef gem::OverlayCollection::getOverlayAt ( int index) const
inlinenoexceptinherited

Get the overlay at the specified index.

Parameters
indexThe index of the overlay
Returns
Empty if the index is out of bounds

◆ getOverlayByUid()

const OverlayInfoRef gem::OverlayCollection::getOverlayByUid ( int overlayUid) const
inlinenoexceptinherited

Get the overlay having the specified UID.

Parameters
overlayUidThe overlay UID
Returns
Empty if the overlay is not found

◆ getRenderSettingsByUid()

OverlayRenderSettings gem::MapViewOverlayCollection::getRenderSettingsByUid ( int uid) const
inlinenoexcept

Get rendering settings for the given overlay.

Parameters
[in]uidThe overlay id. The list of available overlays can be obtained by using OverlayService
Returns
The rendering settings

◆ iterateOverlays()

template<typename TCollector>
bool gem::OverlayCollection::iterateOverlays ( TCollector collector) const
inlineinherited

Iterate all overlays in the collection.

Collector should return true if iteration should continue and false if iteration should stop

Parameters
collectorThe collector function
Returns
True if iteration was successful, false otherwise
Template Parameters
TCollectorThe collector function type

◆ iterateOverlaysAndCategories()

template<typename TCollector>
bool gem::OverlayCollection::iterateOverlaysAndCategories ( TCollector collector) const
inlineinherited

Iterate all overlays & categories in the collection.

Collector should return true if iteration should continue and false if iteration should stop

Parameters
collectorThe collector function
Returns
True if iteration was successful, false otherwise

◆ setRenderSettingsByUid()

MapViewOverlayCollection & gem::MapViewOverlayCollection::setRenderSettingsByUid ( int uid,
const OverlayRenderSettings & settings )
inlinenoexcept

Set overlay render settings.

Parameters
[in]uidThe overlay uid. The list of available overlays can be obtained by using OverlayService
[in]settingsThe rendering settings
Returns
reference to this object

◆ size()

int gem::OverlayCollection::size ( ) const
inlinenoexceptinherited

Get the number of overlay datasets in this collection.

Returns
The number of overlays