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

Provides programmatic control of map overlays. More...

Inheritance diagram for gem::OverlayService:
Collaboration diagram for gem::OverlayService:

Public Member Functions

 OverlayService (const OverlayService &service)=delete
 Default copy constructor.
 OverlayService (OverlayService &&service)=default
 Default move constructor.
OverlayService & operator= (const OverlayService &service)=delete
 Default copy assignment.
OverlayService & operator= (OverlayService &&service)=default
 Default move assignment noexcept is deduced.
std::pair< OverlayCollectionRef, bool > getAvailableOverlays (ProgressListener listener=ProgressListener()) const noexcept
 Get list of SDK available overlays.
int enableOverlay (int uid, int categUid=-1) noexcept
 Enables the overlay with the given uid.
int disableOverlay (int uid, int categUid=-1) noexcept
 Disables the overlay with the given uid.
bool isOverlayEnabled (int uid, int categUid=-1) const noexcept
 Check if the overlay with the given uid is enabled.
int enableOverlayOfflineDataGrabber (int uid) noexcept
 Enables the offline data grabber for the overlay with the given uid.
int disableOverlayOfflineDataGrabber (int uid) noexcept
 Disables the offline data grabber for the overlay with the given uid.
bool isOverlayOfflineDataGrabberEnabled (int uid) const noexcept
 Check if the offline data grabber for the given overlay uid is enabled.
bool isOverlayOfflineDataGrabberSupported (int uid) const noexcept
 Check if the offline data grabber for the given overlay uid is supported.
int grabOverlayOfflineData (int uid, ProgressListener listener) noexcept
 Grab latest overlay offline data over all existing offline maps area.
void cancelGrabOverlayOfflineData (int uid) noexcept
 Grab latest overlay offline data over all existing offline maps area.

Detailed Description

Provides programmatic control of map overlays.

Implements share read/write Api object over IOverlayService.

This behaves like a singleton, i.e. all instances are shared behind the same API interface

Manages lifecycle of overlay elements displayed within a MapView.

Constructor & Destructor Documentation

◆ OverlayService() [1/2]

gem::OverlayService::OverlayService ( const OverlayService & service)
delete

Default copy constructor.

Parameters
serviceThe OverlayService object to copy

◆ OverlayService() [2/2]

gem::OverlayService::OverlayService ( OverlayService && service)
default

Default move constructor.

Parameters
serviceThe OverlayService object to move noexcept is deduced

Member Function Documentation

◆ cancelGrabOverlayOfflineData()

void gem::OverlayService::cancelGrabOverlayOfflineData ( int uid)
inlinenoexcept

Grab latest overlay offline data over all existing offline maps area.

Parameters
[in]uidThe overlay uid

◆ disableOverlay()

int gem::OverlayService::disableOverlay ( int uid,
int categUid = -1 )
inlinenoexcept

Disables the overlay with the given uid.

This will deactivate the overlay for all registered services ( map views, alarms, etc )

Parameters
[in]uidThe overlay uid
[in]categUidThe overlay category uid ( optional )

If -1 the whole overlay will be disabled

Returns
KNoError on success, error::KNotFound if the overlay is not found

◆ disableOverlayOfflineDataGrabber()

int gem::OverlayService::disableOverlayOfflineDataGrabber ( int uid)
inlinenoexcept

Disables the offline data grabber for the overlay with the given uid.

Parameters
[in]uidThe overlay uid
Returns
KNoError on success, error::KNotFound if the overlay is not found

◆ enableOverlay()

int gem::OverlayService::enableOverlay ( int uid,
int categUid = -1 )
inlinenoexcept

Enables the overlay with the given uid.

This will activate the overlay for all registered services ( map views, alarms, etc )

Parameters
[in]uidThe overlay uid
[in]categUidThe overlay category uid ( optional )

If -1 the whole overlay will be enabled

Returns
KNoError on success, error::KNotFound if the overlay is not found

◆ enableOverlayOfflineDataGrabber()

int gem::OverlayService::enableOverlayOfflineDataGrabber ( int uid)
inlinenoexcept

Enables the offline data grabber for the overlay with the given uid.

Parameters
[in]uidThe overlay uid

The offline data grabber downloads an overlay covering dataset for every new downloaded road map content

The offline data is automatically grabbed immediately after a road map content download finishes & is stored in the SDK permanent cache

Returns
KNoError on success, error::KNotFound if the overlay is not found

◆ getAvailableOverlays()

std::pair< OverlayCollectionRef, bool > gem::OverlayService::getAvailableOverlays ( ProgressListener listener = ProgressListener()) const
inlinenoexcept

Get list of SDK available overlays.

Parameters
[in]listenerProgress listener. If not all overlays info is available onboard, a notification will be sent when it will be downloaded
Returns
Pair <OverlayCollectionRef, boolean>. If pair.second == false, some overlays information is not available, and will be downloaded when network is available

◆ grabOverlayOfflineData()

int gem::OverlayService::grabOverlayOfflineData ( int uid,
ProgressListener listener )
inlinenoexcept

Grab latest overlay offline data over all existing offline maps area.

Parameters
[in]uidThe overlay uid
[in]listenerProgress listener
Returns
KNoError on success, error::KInvalidInput if no listener specified,

◆ isOverlayEnabled()

bool gem::OverlayService::isOverlayEnabled ( int uid,
int categUid = -1 ) const
inlinenoexcept

Check if the overlay with the given uid is enabled.

Parameters
[in]uidThe overlay uid
[in]categUidThe overlay category uid ( optional )

If -1 the whole overlay will be disabled

Returns
True if the overlay is enabled, false otherwise

◆ isOverlayOfflineDataGrabberEnabled()

bool gem::OverlayService::isOverlayOfflineDataGrabberEnabled ( int uid) const
inlinenoexcept

Check if the offline data grabber for the given overlay uid is enabled.

Parameters
[in]uidThe overlay uid
Returns
True if the offline data grabber is enabled, false otherwise

◆ isOverlayOfflineDataGrabberSupported()

bool gem::OverlayService::isOverlayOfflineDataGrabberSupported ( int uid) const
inlinenoexcept

Check if the offline data grabber for the given overlay uid is supported.

Parameters
[in]uidThe overlay uid
Returns
True if the offline data grabber is supported, false otherwise

◆ operator=() [1/2]

OverlayService & gem::OverlayService::operator= ( const OverlayService & service)
delete

Default copy assignment.

Parameters
serviceThe OverlayService object to copy
Returns
The copied OverlayService object

◆ operator=() [2/2]

OverlayService & gem::OverlayService::operator= ( OverlayService && service)
default

Default move assignment noexcept is deduced.

Parameters
serviceThe OverlayService object to move
Returns
The moved OverlayService object