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

GuidedAddressSearchService object. More...

Inheritance diagram for gem::GuidedAddressSearchService:
Collaboration diagram for gem::GuidedAddressSearchService:

Public Member Functions

 GuidedAddressSearchService (const GuidedAddressSearchService &)=delete
 Default copy constructor.
 GuidedAddressSearchService (GuidedAddressSearchService &&api)=default
 Default move constructor noexcept is deduced.
GuidedAddressSearchService & operator= (const GuidedAddressSearchService &)=delete
 Default copy assignment.
GuidedAddressSearchService & operator= (GuidedAddressSearchService &&api)=default
 Default move assignment noexcept is deduced.
GuidedAddressSearchPreferencesRef preferences () noexcept
 Get access to Guided Address Search preferences (for this session).
int search (LandmarkList &results, const Landmark &parent, const String &filter, EAddressDetailLevel detailToSearch, ProgressListener progress) noexcept
 Search for more details starting at the selected parent landmark.
void cancelSearch (ProgressListener progress) noexcept
 Cancel currently active search command.
EAddressDetailLevel getAddressDetailLevel (const Landmark &landmark) const noexcept
 Get the address detail level for a landmark.
IntList getNextAddressDetailLevel (const Landmark &landmark) const noexcept
 Get the list of next possible address detail levels that can be searched for a landmark.
Landmark getCountryLevelItem (const String &countryIsoCode) const noexcept
 Get the country level item for specific country iso code that can be used by guided address search.
const TransferStatisticsRef getTransferStatistics () const noexcept
 Get data transfer statistics for this service.

Detailed Description

GuidedAddressSearchService object.

Implements share-read / write Api object over IGuidedAddressSearchService.

Constructor & Destructor Documentation

◆ GuidedAddressSearchService()

gem::GuidedAddressSearchService::GuidedAddressSearchService ( GuidedAddressSearchService && api)
default

Default move constructor noexcept is deduced.

Parameters
apiThe GuidedAddressSearchService object to move

Member Function Documentation

◆ cancelSearch()

void gem::GuidedAddressSearchService::cancelSearch ( ProgressListener progress)
inlinenoexcept

Cancel currently active search command.

Parameters
[in]progressProgress listener for the operation.

◆ getAddressDetailLevel()

EAddressDetailLevel gem::GuidedAddressSearchService::getAddressDetailLevel ( const Landmark & landmark) const
inlinenoexcept

Get the address detail level for a landmark.

Returns
EAddressDetailLevel::AD_NoDetail If landmark is not obtained via a previous call to GuidedAddressSearchService::search() method.
Address detail level for the landmark in range of EAddressDetailLevel.
Parameters
[in]landmarkThe landmark for which to get the address detail level.

◆ getCountryLevelItem()

Landmark gem::GuidedAddressSearchService::getCountryLevelItem ( const String & countryIsoCode) const
inlinenoexcept

Get the country level item for specific country iso code that can be used by guided address search.

Returns
default Landmark if the country code is invalid.
Parameters
[in]countryIsoCodeThe country iso code for which to get the country level item.

◆ getNextAddressDetailLevel()

IntList gem::GuidedAddressSearchService::getNextAddressDetailLevel ( const Landmark & landmark) const
inlinenoexcept

Get the list of next possible address detail levels that can be searched for a landmark.

It is country dependent.

For example, for a street it may be possible to get AD_Crossing and AD_HouseNumber in some countries but in others to get AD_StreetSection.

Parameters
[in]landmarkThe landmark for which to get the next possible address detail levels to search. If the landmark is default only AD_Country will be in the list. If there are no more address detail levels available then empty is returned.
Returns
List next possible address detail levels. Items of the list are in range of EAddressDetailLevel enum.

◆ getTransferStatistics()

const TransferStatisticsRef gem::GuidedAddressSearchService::getTransferStatistics ( ) const
inlinenoexcept

Get data transfer statistics for this service.

Returns
Reference to TransferStatistics object.

◆ operator=()

GuidedAddressSearchService & gem::GuidedAddressSearchService::operator= ( GuidedAddressSearchService && api)
default

Default move assignment noexcept is deduced.

Parameters
apiThe GuidedAddressSearchService object to move
Returns
The moved GuidedAddressSearchService object

◆ preferences()

GuidedAddressSearchPreferencesRef gem::GuidedAddressSearchService::preferences ( )
inlinenoexcept

Get access to Guided Address Search preferences (for this session).

Returns
Reference to GuidedAddressSearchPreferences object.

◆ search()

int gem::GuidedAddressSearchService::search ( LandmarkList & results,
const Landmark & parent,
const String & filter,
EAddressDetailLevel detailToSearch,
ProgressListener progress )
inlinenoexcept

Search for more details starting at the selected parent landmark.

Starting at the selected parent landmark the engine will search the required detail level using the provided filter.

Parameters
[out]resultsThe list of results.
[in]parentThe starting point for the search. If it is default then the only detail level that can be searched is AD_Country. If the landmark address detail level is AD_Street then the next details that can be searched may be AD_HouseNumber or AD_Crossing (for example). It is also allowed to "decrease" the search level and use AD_City (for example).
[in]filterThe filter to use when searching for the required detail level. If it is empty then all items are returned (limited to the maximum number of matches from preferences).
[in]detailToSearchThe address detail level to search.
[in]progressProgress listener for the operation.
Returns
KNoError if the search was successfully started
error::KInvalidInput if the search input is invalid, e.g. referenceCoordinates are invalids

If online search service is available ( SdkSettings().getOnlineServiceRestriction( MapDataService ) == 0 ), the search is always performed online

Possible error codes returned in IProgressListener::notifyComplete

Returns
KNoError if the search was successfully completed
error::KCancel if the search was canceled by the user
error::KReducedResult if the returned results is a subset of the all possible results ( due to SearchPreferences::maxMatches constraint ) and there are not enough criteria to prioritize them
error::KNoMemory if the search engine couldn't allocate the necessary memory for the operation
error::KOperationTimeout if the search was executed on the online service and the operation took too much time to complete ( usually more than 1 min, depending on the server overload state )
error::KNetworkFailed if the search was executed on the online service and the operation failed due to bad network connection
error::KMissingCapability if the SDK distribution was configured without search service