@magiclane/maps-sdk
    Preparing search index...

    Class MapDetailsAbstract

    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.

    CountryData - Compact country metadata including name, ISO code and flag.

    Index

    Constructors

    Accessors

    • get allCountriesData(): CountryData[]

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

      Returns CountryData[]

      Country metadata objects. Image objects may be undefined when a flag is not available for a country

    • get latestOnlineMapVersion(): Version

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

      Returns Version

      Latest online map version metadata

      mapVersion - Retrieve the currently installed map data version

    • get mapVersion(): Version

      Returns the currently installed map data version.

      Returns Version

      Version object describing the installed map data

      latestOnlineMapVersion - Retrieve the latest available online map version

    Methods

    • Returns the geographic bounding rectangle for a country code.

      Parameters

      • code: string

        ISO 3166-1 alpha-3 country code

      Returns RectangleGeographicArea

      The country's bounding rectangle in WGS84 coordinates

    • 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.

      Parameters

      Returns string

      ISO 3166-1 alpha-3 country code, or an empty string

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

      Parameters

      • index: number

        Country index

      Returns string

      ISO 3166-1 alpha-3 country code, or an empty string

    • Returns country metadata for the supplied country ID.

      Parameters

      • id: number

        Internal country identifier

      Returns CountryData | undefined

      A CountryData instance when available, otherwise undefined

    • Returns the number of country entries available in the SDK.

      Returns number

      Total count of country data entries

    • 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.

      Parameters

      • countryCode: string

        ISO 3166-1 alpha-3 code of the country

      • Optionalsize: { height: number; width: number }

        Optional desired image size

      • Optionalformat: ImageFileFormat

        Optional image format

      Returns Uint8Array<ArrayBufferLike> | undefined

      Raw image bytes for the flag, or undefined if unavailable

      • getCountryFlagImg - Retrieve an Img wrapper for the flag
      • getCountryFlagByIndex - Retrieve flag image bytes by index
    • Returns the country flag image bytes for the specified country index.

      Parameters

      • index: number

        Internal country index

      • Optionalsize: { height: number; width: number }

        Optional desired image size. If omitted the image's natural size is returned

      • Optionalformat: ImageFileFormat

        Optional image format

      Returns Uint8Array<ArrayBufferLike> | undefined

      Raw image bytes for the flag, or undefined if unavailable

      • getCountryFlagImgByIndex - Retrieve an Img wrapper for the flag
      • getCountryFlag - Retrieve flag image bytes by ISO code
    • 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.

      Parameters

      • countryCode: string

        ISO 3166-1 alpha-3 code

      Returns Img | undefined

      The Img object representing the flag, or undefined if not available

      • getCountryFlag - Retrieve flag image bytes directly
      • getCountryFlagByIndex - Retrieve flag image bytes by index
    • 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.

      Parameters

      • index: number

        Country index

      Returns Img | undefined

      An Img object when available, otherwise undefined

      • getCountryFlagByIndex - Retrieve flag image bytes directly
      • getCountryFlagImg - Retrieve an Img wrapper by ISO code
    • 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.

      Parameters

      • code: string

        ISO 3166-1 alpha-3 country code (for example, USA)

      Returns MapCoverage

      Coverage status for the specified country

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

      Parameters

      Returns string

      The country name, or an empty string if none is found

    • Returns the country name associated with an internal country index.

      Parameters

      • index: number

        Internal country index

      Returns string

      The country name for the given index

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

      Parameters

      • code: string

        ISO 3166-1 alpha-3 country code

      Returns string

      The country name for the given 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.

      Parameters

      Returns string[]

      Language ISO codes for the country, or an empty list

    • Returns language codes for the country with the given index.

      Parameters

      • index: number

        Country index

      Returns string[]

      A list of language ISO codes

    • 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.

      Parameters

      • coords: Coordinates[]

        List of WGS84 coordinates that define the region of interest

      Returns MapCoverage

      Enum value describing the coverage status for the supplied region

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

      Returns Set<MapExtendedCapability>

      A set containing enabled capabilities

      MapExtendedCapability - Enumeration of possible capabilities

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

      Returns number[]

      Integer IDs corresponding to MapProviderId values. The list may be empty if no map data is present

    • Returns the map release date/time in UTC.

      Returns Date

      UTC timestamp representing the map release instant

    • Returns the map coverage status for a single WGS84 coordinate.

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

      Parameters

      Returns MapCoverage

      Enum value describing the coverage status for the supplied coordinate

    • Returns the display name for a map provider.

      Parameters

      Returns string

      Provider name

    • Returns the copyright or attribution sentence for a provider.

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

      Parameters

      Returns string

      Copyright/attribution sentence for the provider

    • 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.

      Parameters

      • coords: Coordinates

        WGS84 coordinates for the location

      • time: Date

        Reference date/time (used to compute seasonal sunrise/sunset times)

      Returns [Date, Date]

      Tuple where the first element is sunrise (UTC) and the second is sunset (UTC)

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

      Parameters

      • coords: Coordinates

        WGS84 coordinates

      • time: Date

        Reference time

      Returns boolean

      True if it is night at the specified location/time, false otherwise

      getSunriseAndSunset - Retrieve sunrise/sunset times for a location