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

    Class TimezoneService

    Timezone Service class

    Provides information about timezones.

    Index

    Constructors

    Methods

    • Async gets timezone info based on a coordinate and a timestamp

      Parameters

      • IN coords The location from where to get the timezone result
      • IN time The time for which offsets are calculated (UTC)
      • IN accurateResult If left 'false' the result will be computed using the available offline resource. If 'true' an HTTP request will be performed for computing the result
      • IN onComplete The callback which will be called when the operation completes.
        • Will be called with GemError.success error and non-null result upon success.
        • Will be called with GemError.internalAbort error and null result if the result parsing failed or server internal error occurred

      Returns

      • EventDrivenProgressListener for the operation progress if the operation could be started, null otherwise

      Throws

      • An exception if it fails.

      Parameters

      Returns EventDrivenProgressListener | null

    • Synchronously gets timezone info based on a coordinate and a timestamp

      Parameters

      • IN coords The location from where to get the timezone result
      • IN time The time for which offsets are calculated (UTC)

      Returns

      • A TimezoneResult if the operation was successful, null otherwise

      Throws

      • An exception if it fails.

      Parameters

      Returns TimezoneResult | null

    • Async gets timezone info based on a timezone id and a timestamp

      Parameters

      • IN timezoneId The geographic location on earth of type: "Continent/City". Examples: Europe/Paris, America/New_York, Europe/Moscow
      • IN time The time for which offsets are calculated (UTC)
      • IN accurateResult If left 'false' the result will be computed using the available offline resource. If 'true' an HTTP request will be performed for computing the result
      • IN onComplete The callback which will be called when the operation completes.
        • Will be called with GemError.success error and non-null result upon success.
        • Will be called with GemError.internalAbort error and null result if the result parsing failed or server internal error occurred

      Returns

      • EventDrivenProgressListener for the operation progress if the operation could be started, null otherwise

      Throws

      • An exception if it fails.

      Parameters

      • params: {
            onComplete?: (error: GemError, result?: TimezoneResult) => void;
            time: Date;
            timezoneId: string;
        }

      Returns EventDrivenProgressListener | null

    • Synchronously gets timezone info based on a timezone ID and a timestamp

      Parameters

      • IN timezoneId The IANA timezone identifier (e.g., "America/New_York") for which the timezone result is requested
      • IN time The time for which offsets are calculated (UTC)

      Returns

      • A TimezoneResult if the operation was successful, null otherwise

      Throws

      • An exception if it fails.

      Parameters

      • params: { time: Date; timezoneId: string }

      Returns TimezoneResult | null