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

Map view marker collections. More...

Inheritance diagram for gem::MapViewMarkerCollections:
Collaboration diagram for gem::MapViewMarkerCollections:

Public Member Functions

int size () const noexcept
 Get collection size.
MarkerCollectionRef getCollectionAt (int index) const noexcept
 Get collection at index.
int indexOf (const MarkerCollection &col) const noexcept
 Get the index of the given collection.
int indexOf (const String &name) const noexcept
 Get the index of the given collection name.
bool contains (const MarkerCollection &col) const noexcept
 Check if the specified collection is in the collection.
MapViewMarkerCollectionsadd (const MarkerCollection &col, const MarkerCollectionRenderSettings &settings=MarkerCollectionRenderSettings()) noexcept
 Add collection.
MapViewMarkerCollectionsremove (const MarkerCollection &col) noexcept
 Remove collection.
MapViewMarkerCollectionsremove (int index) noexcept
 Remove collection.
const MarkerCollectionRenderSettingsgetRenderSettings (int index) const noexcept
 Gets collection render settings.
const MarkerCollectionRenderSettingsgetDisplaySettings (int index) const noexcept
int setRenderSettings (int index, const MarkerCollectionRenderSettings &settings) noexcept
 Sets collection render settings.
int setDisplaySettings (int index, const MarkerCollectionRenderSettings &settings) noexcept
void clear ()
 Remove all collections.
MarkerMatchList hitTest (const RectangleGeographicArea &area, const Marker *ignore=nullptr) const noexcept
 Hit test in all collections.
template<typename TCollector>
bool iterateCollections (TCollector collector) const noexcept
 Iterate marker collections and call collector for each.
int save (DataBuffer &buffer) const noexcept
 Serialize to buffer.
int load (const DataBuffer &buffer) noexcept
 Deserialize from buffer.
MarkerSketchesRef sketches (EMarkerType type) const noexcept
 Sketches collection access.
bool isSketches (const MarkerCollection &coll) const noexcept
 Check if the given collection is a sketches collection.

Detailed Description

Map view marker collections.

Implements share-read / share-write Api object over IMapViewMarkerCollections

Member Function Documentation

◆ add()

MapViewMarkerCollections & gem::MapViewMarkerCollections::add ( const MarkerCollection & col,
const MarkerCollectionRenderSettings & settings = MarkerCollectionRenderSettings() )
inlinenoexcept

Add collection.

Parameters
[in]colThe markers collection to be added
[in]settingsThe markers collection render settings
Returns
MapViewMarkerCollections reference

◆ contains()

bool gem::MapViewMarkerCollections::contains ( const MarkerCollection & col) const
inlinenoexcept

Check if the specified collection is in the collection.

Parameters
[in]colThe markers collection to be searched
Returns
true if the collection is in the collection, false otherwise

◆ getCollectionAt()

MarkerCollectionRef gem::MapViewMarkerCollections::getCollectionAt ( int index) const
inlinenoexcept

Get collection at index.

Parameters
[in]indexThe collection index
Returns
The MarkerCollection reference

◆ getDisplaySettings()

const MarkerCollectionRenderSettings * gem::MapViewMarkerCollections::getDisplaySettings ( int index) const
inlinenoexcept
Deprecated
name
Parameters
[in]indexThe collection index
Returns
The Marker collection render settings

◆ getRenderSettings()

const MarkerCollectionRenderSettings * gem::MapViewMarkerCollections::getRenderSettings ( int index) const
inlinenoexcept

Gets collection render settings.

Parameters
[in]indexThe collection index
Returns
The Marker collection render settings

◆ hitTest()

MarkerMatchList gem::MapViewMarkerCollections::hitTest ( const RectangleGeographicArea & area,
const Marker * ignore = nullptr ) const
inlinenoexcept

Hit test in all collections.

Parameters
[in]areaThe geographic area to be tested
ignoreThe marker to be ignored
Returns
The list of marker matches

◆ indexOf() [1/2]

int gem::MapViewMarkerCollections::indexOf ( const MarkerCollection & col) const
inlinenoexcept

Get the index of the given collection.

Parameters
[in]colThe markers collection to be searched
Returns
The collection index on success, error::KNotFound on error

◆ indexOf() [2/2]

int gem::MapViewMarkerCollections::indexOf ( const String & name) const
inlinenoexcept

Get the index of the given collection name.

Parameters
[in]nameThe markers collection name to be searched
Returns
The collection index on success, error::KNotFound on error

◆ isSketches()

bool gem::MapViewMarkerCollections::isSketches ( const MarkerCollection & coll) const
inlinenoexcept

Check if the given collection is a sketches collection.

Parameters
[in]collThe collection to be checked
Returns
true if the collection is a sketches collection, false otherwise

◆ iterateCollections()

template<typename TCollector>
bool gem::MapViewMarkerCollections::iterateCollections ( TCollector collector) const
inlinenoexcept

Iterate marker collections and call collector for each.

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

Parameters
[in]collectorThe collector function
Returns
true if all collections were iterated, false if the iteration was stopped by the collector

◆ load()

int gem::MapViewMarkerCollections::load ( const DataBuffer & buffer)
inlinenoexcept

Deserialize from buffer.

Parameters
[in]bufferThe buffer to deserialize from
Returns
0 on success, error code otherwise

◆ remove() [1/2]

MapViewMarkerCollections & gem::MapViewMarkerCollections::remove ( const MarkerCollection & col)
inlinenoexcept

Remove collection.

Parameters
[in]colThe markers collection to be removed
Returns
MapViewMarkerCollections reference

◆ remove() [2/2]

MapViewMarkerCollections & gem::MapViewMarkerCollections::remove ( int index)
inlinenoexcept

Remove collection.

Parameters
[in]indexThe collection index
Returns
MapViewMarkerCollections reference

◆ save()

int gem::MapViewMarkerCollections::save ( DataBuffer & buffer) const
inlinenoexcept

Serialize to buffer.

Parameters
[in]bufferThe buffer to serialize to
Returns
0 on success, error code otherwise

◆ setDisplaySettings()

int gem::MapViewMarkerCollections::setDisplaySettings ( int index,
const MarkerCollectionRenderSettings & settings )
inlinenoexcept
Deprecated
name
Parameters
[in]indexThe collection index
[in]settingsThe Marker collection render settings
Returns
0 on success, error code otherwise

◆ setRenderSettings()

int gem::MapViewMarkerCollections::setRenderSettings ( int index,
const MarkerCollectionRenderSettings & settings )
inlinenoexcept

Sets collection render settings.

Parameters
[in]indexThe collection index
[in]settingsThe Marker collection render settings
Returns
0 on success, error code otherwise

◆ size()

int gem::MapViewMarkerCollections::size ( ) const
inlinenoexcept

Get collection size.

Returns
The number of collections

◆ sketches()

MarkerSketchesRef gem::MapViewMarkerCollections::sketches ( EMarkerType type) const
inlinenoexcept

Sketches collection access.

Parameters
[in]typeThe sketch type, see EMarkerType for values

If type is invalid, an empty reference is returned

Returns
The Marker Sketches collection reference