Home > @magiclane/maps-sdk > MapDetails

MapDetails class

Utilities for querying map metadata, coverage and country information.

The static MapDetails API provides read-only helpers to inspect local map coverage, obtain country names and flags, compute sunrise/sunset times, enumerate map providers, and fetch version/release information.

Signature:

export declare abstract class MapDetails 

Properties

Property

Modifiers

Type

Description

allCountriesData

static

readonly

CountryData[]

Returns a list with metadata for all countries known to the SDK.

latestOnlineMapVersion

static

readonly

Version

Returns the latest available online map version known to the SDK.

mapVersion

static

readonly

Version

Returns the currently installed map data version.

Methods

Method

Modifiers

Description

getCountryBoundingRectangle(code)

static

Returns the geographic bounding rectangle for a country code.

getCountryCode(coords)

static

Returns the ISO 3166-1 alpha-3 country code for the supplied WGS84 coordinates.

The method returns an empty string when the coordinates do not fall within any recognised country.

getCountryCodeByIndex(index)

static

Returns the ISO 3166-1 alpha-3 country code for an internal index.

getCountryData(id)

static

Returns country metadata for the supplied country ID.

getCountryDataCount()

static

Returns the number of country entries available in the SDK.

getCountryFlag(countryCode, size, format, allowResize)

static

Returns raw image bytes for the country flag by ISO 3166-1 alpha-3 code.

If the provided countryCode is invalid a default question-mark image may be returned by the platform implementation.

getCountryFlagByIndex(index, size, format, allowResize)

static

Returns the country flag image bytes for the specified country index.

getCountryFlagImg(countryCode)

static

Get the country flag image by ISO code as an Img.

Prefer Img when you need SDK-managed metadata (uid, recommended size/aspectRatio, scalability) or to request raw image bytes; use getCountryFlag when you only need raw image bytes.

getCountryFlagImgByIndex(index)

static

Get the country flag image by index as an Img.

Prefer Img when you need SDK-managed metadata (uid, recommended size/aspectRatio, scalability) or to request raw image bytes; use getCountryFlagByIndex when you only need raw image bytes.

getCountryMapCoverage(code)

static

Returns the map coverage status for a country identified by its ISO code.

The check is performed locally and is fast. Use the returned value to determine whether offline tiles exist for the whole country.

getCountryName(coords)

static

Returns the display name of the country that contains the coordinates.

getCountryNameByIndex(index)

static

Returns the country name associated with an internal country index.

getCountryNameByISO(code)

static

Returns the country name for the supplied ISO 3166-1 alpha-3 code.

getLanguageCode(coords)

static

Returns language codes for the country that contains the coordinates.

Returns an empty list when the coordinates do not map to a known country.

getLanguageCodeByIndex(index)

static

Returns language codes for the country with the given index.

getMapCoverage(coords)

static

Returns the map coverage status for a region defined by WGS84 coordinates.

This method performs a local check using only device data and does not perform any network requests. It is suitable for quickly determining whether map tiles for a region are available offline.

getMapExtendedCapabilities()

static

Returns the set of extended map capabilities enabled for the current map data.

getMapProviderIds()

static

Returns a list of available map provider IDs present on the device.

getMapReleaseInfo()

static

Returns the map release date/time in UTC.

getPointMapCoverage(coords)

static

Returns the map coverage status for a single WGS84 coordinate.

This convenience helper evaluates coverage for a single point using only device-local information.

getProviderName(id)

static

Returns the display name for a map provider.

getProviderSentence(id)

static

Returns the copyright or attribution sentence for a provider.

Use this text when displaying attribution for map tiles or provider content.

getSunriseAndSunset(coords, time)

static

Returns the sunrise and sunset times (UTC) for the supplied position and reference date.

The returned times are in UTC. Near the poles the sunrise or sunset may fall on a different calendar day; callers should treat these values as UTC instants.

isNight(coords, time)

static

Returns whether it is night at the given coordinates and reference time.