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

MapDetails object. More...

Inheritance diagram for gem::MapDetails:
Collaboration diagram for gem::MapDetails:

Public Member Functions

 MapDetails (const MapDetails &)=delete
 MapDetails (MapDetails &&)=default
 Default move constructor noexcept is deduced.
MapDetails & operator= (const MapDetails &)=delete
MapDetails & operator= (MapDetails &&mapDetails)=default
 Default move assignment noexcept is deduced.
EMapCoverage getMapCoverage (const Coordinates &coords) const noexcept
 Get the map coverage for the region specified by WGS84 coordinates.
EMapCoverage getMapCoverage (const CoordinatesList &coords) const noexcept
 Get the map coverage for the region specified by WGS84 coordinates.
EMapCoverage getCountryMapCoverage (const String &code) const noexcept
 Get the map coverage for the country specified by ISO 3166-1 alpha-3 country code.
String getCountryName (const Coordinates &coords) const noexcept
 Get the country name for the specified WGS.
String getCountryName (unsigned int index) const noexcept
 Get the country name for the specified index.
String getCountryCode (const Coordinates &coords) const noexcept
 Get the ISO 3166-1 alpha-3 country code for the specified WGS.
StringList getLanguageCodes (const Coordinates &coords) const noexcept
 Get the language codes for the specified WGS.
String getCountryCode (unsigned int index) const noexcept
 Get the ISO 3166-1 alpha-3 country code for the specified index.
Image getCountryImage (unsigned int index) const noexcept
 Get country image for the specified index.
StringList getLanguageCodes (unsigned int index) const noexcept
 Get the language codes for the specified index.
int getCountryMapCapabilities (const String &code) const noexcept
 Get the capabilities for a country map.
String getCountryName (const String &isoCode) const noexcept
 Get the country name for the isoCode.
Image getCountryFlag (const String &isoCode) const noexcept
 Get the country flag for the isoCode.
RectangleGeographicArea getCountryBoundingRectangle (const String &isoCode) const noexcept
 Get the country bounding rectangle for the isoCode.
std::pair< Time, TimegetSunriseAndSunset (const Coordinates &coords, const Time &refTime=Time()) const noexcept
 Get the sunrise & sunset for the specified reference date and WGS position.
bool isNight (const Coordinates &coords, const Time &refTime=Time()) const noexcept
 Check if it is night at the specified coordinated and time.
IntList getMapProviderIds () const noexcept
 Get the map provider IDs list.
String getProviderName (EMapProviderId id) const noexcept
 Get the name of the specified provider.
String getProviderSentence (EMapProviderId id) const noexcept
 Get the copyright statement for the specified provider.
Image getProviderLogo (EMapProviderId id) const noexcept
 Get the logo of the specified provider.
int getMapExtendedCapabilities () const noexcept
 Get map extended capabilities as int.
int getCountryData (int idx, String &name, Image &image, String &iso) const noexcept
 Get country data browse.
int getCountryDataCount () const noexcept
 Get country data count.
template<typename TCollector>
bool iterateCountries (TCollector collector) const noexcept
 Iteration through country data.
Version getMapVersion () const noexcept
 Get map version.
Version getLatestOnlineMapVersion () const noexcept
 Get latest online map version.
std::pair< Time, StringgetMapReleaseInfo () const noexcept
 Get map release date.
MapSpeedLimitList getCountrySpeedLimits (const String &isoCode) const
 Get speed limits list for the country specified by ISO 3166-1 alpha-3 country code.

Detailed Description

MapDetails object.

It provides the attributes of a map at the specified coordinates.

Implements share-read / write Api object over IMapDetails.

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

Member Function Documentation

◆ getCountryBoundingRectangle()

RectangleGeographicArea gem::MapDetails::getCountryBoundingRectangle ( const String & isoCode) const
inlinenoexcept

Get the country bounding rectangle for the isoCode.

Parameters
[in]isoCodeISO 3166-1 alpha-3 country code.
Returns
Country bounding rectangle.

◆ getCountryCode() [1/2]

String gem::MapDetails::getCountryCode ( const Coordinates & coords) const
inlinenoexcept

Get the ISO 3166-1 alpha-3 country code for the specified WGS.

Empty string means no country. See: http://en.wikipedia.org/wiki/ISO_3166-1 for the list of codes.

Parameters
[in]coordsCoordinates
Returns
Country code as String.

◆ getCountryCode() [2/2]

String gem::MapDetails::getCountryCode ( unsigned int index) const
inlinenoexcept

Get the ISO 3166-1 alpha-3 country code for the specified index.

Empty string means no country. See: http://en.wikipedia.org/wiki/ISO_3166-1 for the list of codes.

Parameters
[in]indexCountry index.
Returns
Country code as String.

◆ getCountryData()

int gem::MapDetails::getCountryData ( int idx,
String & name,
Image & image,
String & iso ) const
inlinenoexcept

Get country data browse.

Parameters
[in]idxCountry index
[out]nameCountry name
[out]imageCountry flag image
[out]isoCountry ISO code
Returns
Error code

◆ getCountryDataCount()

int gem::MapDetails::getCountryDataCount ( ) const
inlinenoexcept

Get country data count.

Returns
Country data count

◆ getCountryFlag()

Image gem::MapDetails::getCountryFlag ( const String & isoCode) const
inlinenoexcept

Get the country flag for the isoCode.

Parameters
[in]isoCodeISO 3166-1 alpha-3 country code.
Returns
Country flag icon.

◆ getCountryImage()

Image gem::MapDetails::getCountryImage ( unsigned int index) const
inlinenoexcept

Get country image for the specified index.

Parameters
[in]indexCountry index.
Returns
Country image.

◆ getCountryMapCapabilities()

int gem::MapDetails::getCountryMapCapabilities ( const String & code) const
inlinenoexcept

Get the capabilities for a country map.

This method checks the data available on the device. Check TCountryCapability for possible return values.

Parameters
[in]codeISO 3166-1 alpha-3 country code.
Returns
Country map capabilities as int.

◆ getCountryMapCoverage()

EMapCoverage gem::MapDetails::getCountryMapCoverage ( const String & code) const
inlinenoexcept

Get the map coverage for the country specified by ISO 3166-1 alpha-3 country code.

This function checks the map coverage status using only the information available on the device. No server connection is performed. This check is performed fast.

Parameters
[in]codeISO 3166-1 alpha-3 country code.
Returns
ECoverageOffline Entire country map is available on the device.
ECoverageOnlineNoData Country map is available but not all tiles are on the device.
ECoverageUnknown No map coverage available on device and cannot determine if there exists content on the server.

◆ getCountryName() [1/3]

String gem::MapDetails::getCountryName ( const Coordinates & coords) const
inlinenoexcept

Get the country name for the specified WGS.

Parameters
[in]coordsCoordinates
Returns
Country name as String.

◆ getCountryName() [2/3]

String gem::MapDetails::getCountryName ( const String & isoCode) const
inlinenoexcept

Get the country name for the isoCode.

Parameters
[in]isoCodeISO 3166-1 alpha-3 country code.
Returns
Country name as String.

◆ getCountryName() [3/3]

String gem::MapDetails::getCountryName ( unsigned int index) const
inlinenoexcept

Get the country name for the specified index.

Parameters
[in]indexCountry index.
Returns
Country name as String.

◆ getCountrySpeedLimits()

MapSpeedLimitList gem::MapDetails::getCountrySpeedLimits ( const String & isoCode) const
inline

Get speed limits list for the country specified by ISO 3166-1 alpha-3 country code.

Parameters
[in]isoCodeThe collector
Returns
Country speed limits list

◆ getLanguageCodes() [1/2]

StringList gem::MapDetails::getLanguageCodes ( const Coordinates & coords) const
inlinenoexcept

Get the language codes for the specified WGS.

Empty list means no coordinates match. See: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for the list of codes.

Parameters
[in]coordsCoordinates
Returns
Language codes as StringList.

◆ getLanguageCodes() [2/2]

StringList gem::MapDetails::getLanguageCodes ( unsigned int index) const
inlinenoexcept

Get the language codes for the specified index.

See: https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes for the list of codes.

Parameters
[in]indexCountry index.
Returns
Language codes as StringList.

◆ getLatestOnlineMapVersion()

Version gem::MapDetails::getLatestOnlineMapVersion ( ) const
inlinenoexcept

Get latest online map version.

Returns
Latest online map version

◆ getMapCoverage() [1/2]

EMapCoverage gem::MapDetails::getMapCoverage ( const Coordinates & coords) const
inlinenoexcept

Get the map coverage for the region specified by WGS84 coordinates.

This function checks only using the information available on device about map coverage status at the specified coordinates. No server connection is performed. This check is performed fast.

Parameters
[in]coordsWGS84 coordinates.
Returns
Map coverage for specified coordinates.

◆ getMapCoverage() [2/2]

EMapCoverage gem::MapDetails::getMapCoverage ( const CoordinatesList & coords) const
inlinenoexcept

Get the map coverage for the region specified by WGS84 coordinates.

This function checks only using the information available on device about map coverage status at the specified coordinates. No server connection is performed.

Parameters
[in]coordsList of coordinates.
Returns
Map coverage for specified coordinates.

◆ getMapExtendedCapabilities()

int gem::MapDetails::getMapExtendedCapabilities ( ) const
inlinenoexcept

Get map extended capabilities as int.

Check TMapExtendedCapability for possible return values.

Returns
Map extended capabilities as int.

◆ getMapProviderIds()

IntList gem::MapDetails::getMapProviderIds ( ) const
inlinenoexcept

Get the map provider IDs list.

The function returns the list of map provider IDs. It may be empty if no map data is available on the device.

Returns
The map provider IDs list. The values will be in range of TMapProviderId enumeration.

◆ getMapReleaseInfo()

std::pair< Time, String > gem::MapDetails::getMapReleaseInfo ( ) const
inlinenoexcept

Get map release date.

Returns
Map release date and info

◆ getMapVersion()

Version gem::MapDetails::getMapVersion ( ) const
inlinenoexcept

Get map version.

Returns
Map version

◆ getProviderLogo()

Image gem::MapDetails::getProviderLogo ( EMapProviderId id) const
inlinenoexcept

Get the logo of the specified provider.

Parameters
[in]idThe provider ID.
Returns
The logo of the specified provider.

◆ getProviderName()

String gem::MapDetails::getProviderName ( EMapProviderId id) const
inlinenoexcept

Get the name of the specified provider.

Parameters
[in]idThe provider ID.
Returns
The name of the specified provider.

◆ getProviderSentence()

String gem::MapDetails::getProviderSentence ( EMapProviderId id) const
inlinenoexcept

Get the copyright statement for the specified provider.

Parameters
[in]idThe provider ID.
Returns
The copyright.

◆ getSunriseAndSunset()

std::pair< Time, Time > gem::MapDetails::getSunriseAndSunset ( const Coordinates & coords,
const Time & refTime = Time() ) const
inlinenoexcept

Get the sunrise & sunset for the specified reference date and WGS position.

If no time is provided then the device time is used.

Remarks
The sunset may happen next day or even later (close to poles). Returned value is UTC
The sunrise may happen in the same day or before (close to poles). Returned value is UTC
Returns
a pair with sunrise and sunset, first is sunrise, second is sunset
Parameters
[in]coordsWGS Coordinates
[in]refTimeReference time

◆ isNight()

bool gem::MapDetails::isNight ( const Coordinates & coords,
const Time & refTime = Time() ) const
inlinenoexcept

Check if it is night at the specified coordinated and time.

If no time is provided then the device time is used.

Parameters
[in]coordsWGS Coordinates
[in]refTimeReference time
Returns
True if it is night at the specified coordinated and time.

◆ iterateCountries()

template<typename TCollector>
bool gem::MapDetails::iterateCountries ( TCollector collector) const
inlinenoexcept

Iteration through country data.

Collector should have the following signature bool( String, Image, String ). Collector must return true if iteration should continue and false if iteration should stop.

Template Parameters
TCollectorThe collector type
Parameters
[in]collectorThe collector
Returns
True if iteration was successful

◆ operator=()

MapDetails & gem::MapDetails::operator= ( MapDetails && mapDetails)
default

Default move assignment noexcept is deduced.

Parameters
mapDetailsThe object to move
Returns
A reference to this object