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

    Class ContentUpdater

    Provides functionality to update content in the GEM SDK content store.

    This class should not be instantiated directly. Instead, use ContentStore.createContentUpdater to obtain an instance.

    An object used for applying updates to downloaded content packages. It represents a single update session (created by the ContentStore) and is used to start or resume an update, report progress and status changes, and complete the update flow.

    Index

    Constructors

    • Creates a new ContentUpdater instance. Should not be called directly; use ContentStore.createContentUpdater.

      Parameters

      • id: number

        The pointer ID for the updater.

      • mapId: number

        The map ID for the updater.

      Returns ContentUpdater

    Accessors

    • get canApply(): boolean

      Checks if the content update can be applied.

      Returns boolean

      True if the content update can be applied, false otherwise.

    • get isStarted(): boolean

      Checks if the content updater has started.

      Returns boolean

      True if the content update process has started, false otherwise.

    • get mapId(): number

      Gets the map ID for this updater.

      Returns number

    • get pointerId(): number

      Gets the pointer ID for this updater.

      Returns number

    • get progress(): number

      Gets the progress value of the update operation.

      Progress values are calculated with respect to ProgressListener.progressMultiplier.

      Returns number

      The progress value.

    Methods

    • Cancels the content update operation.

      Returns void

    • Disposes the updater and releases associated resources.

      Returns void

    • Starts or resumes the update process.

      Parameters

      • allowChargeNetwork: boolean

        Whether to allow use of a metered/charged network for updates.

      • callbacks: {
            onCompleteCallback?: (error: GemError) => void;
            onProgressUpdated?: (progress: number) => void;
            onStatusUpdated?: (status: ContentUpdaterStatus) => void;
        } = {}

        Optional callbacks:

      Returns EventDrivenProgressListener | null

      The associated ProgressListener for this operation if the update can be started, otherwise null.

    • Initializes a new ContentUpdater instance. Should not be called directly; use ContentStore.createContentUpdater.

      Parameters

      • id: number

        The pointer ID for the updater.

      • mapId: number

        The map ID for the updater.

      Returns ContentUpdater

      A new ContentUpdater instance.