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 |
|---|---|---|---|
|
|
Returns a list with metadata for all countries known to the SDK. | ||
|
|
Returns the latest available online map version known to the SDK. | ||
|
|
Returns the currently installed map data version. |
Methods
|
Method |
Modifiers |
Description |
|---|---|---|
|
|
Returns the geographic bounding rectangle for a country code. | |
|
|
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. | |
|
|
Returns the ISO 3166-1 alpha-3 country code for an internal index. | |
|
|
Returns country metadata for the supplied country ID. | |
|
|
Returns the number of country entries available in the SDK. | |
|
|
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. | |
|
|
Returns the country flag image bytes for the specified country index. | |
|
|
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. | |
|
|
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. | |
|
|
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. | |
|
|
Returns the display name of the country that contains the coordinates. | |
|
|
Returns the country name associated with an internal country index. | |
|
|
Returns the country name for the supplied ISO 3166-1 alpha-3 code. | |
|
|
Returns language codes for the country that contains the coordinates. Returns an empty list when the coordinates do not map to a known country. | |
|
|
Returns language codes for the country with the given index. | |
|
|
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. | |
|
|
Returns the set of extended map capabilities enabled for the current map data. | |
|
|
Returns a list of available map provider IDs present on the device. | |
|
|
Returns the map release date/time in UTC. | |
|
|
Returns the map coverage status for a single WGS84 coordinate. This convenience helper evaluates coverage for a single point using only device-local information. | |
|
|
Returns the display name for a map provider. | |
|
|
Returns the copyright or attribution sentence for a provider. Use this text when displaying attribution for map tiles or provider content. | |
|
|
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. | |
|
|
Returns whether it is night at the given coordinates and reference time. |