Home > @magiclane/maps-sdk > ContentUpdater

ContentUpdater class

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.

Content

Signature:

export declare class ContentUpdater 

Constructors

Constructor

Modifiers

Description

(constructor)(id, mapId)

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

Properties

Property

Modifiers

Type

Description

canApply

readonly

boolean

Checks if the content update can be applied.

contentType

readonly

ContentType

Gets the content type being updated.

isStarted

readonly

boolean

Checks if the content updater has started.

items

readonly

ContentStoreItem[]

Gets the list of content items involved in the update process.

mapId

readonly

number

Gets the map ID for this updater.

pointerId

readonly

number | bigint

Gets the pointer ID for this updater.

progress

readonly

number

Gets the progress value of the update operation.

Progress values are calculated with respect to ProgressListener.progressMultiplier.

status

readonly

ContentUpdaterStatus

Gets the current status of the update operation.

Methods

Method

Modifiers

Description

apply()

Applies the content update.

cancel()

Cancels the content update operation.

dispose()

Disposes the updater and releases associated resources.

init(id, mapId)

static

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

update(allowChargeNetwork, { onStatusUpdated, onProgressUpdated, onCompleteCallback, dataSavePolicy, }, input)

Starts or resumes the update process.