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

    Class ContentStoreItem

    Represents an item in the content store.

    This class should not be instantiated directly. Use ContentStore methods to obtain instances.

    Index

    Constructors

    Accessors

    • get availableSize(): number

      Gets the available size of the content in bytes.

      Returns number

    • get canDeleteContent(): boolean

      Returns true if the associated content can be deleted.

      Returns boolean

    • get chapterName(): string

      Gets the product chapter name, translated to the interface language. Relevant for road map items split into multiple chapters.

      Returns string

    • get clientVersion(): Version

      Gets the client version of the content (local downloaded version).

      Returns Version

    • get countryCodes(): string[]

      Gets the country code (ISO 3166-1 alpha-3) list for the product.

      Returns string[]

    • get downloadProgress(): number

      Gets the current download progress (0..100).

      Returns number

    • get fileName(): string

      Gets the full path to the content data file if available.

      Returns string

    • get id(): number

      Gets the unique id of the item in the content store.

      Returns number

    • get imgPreview(): Img

      Gets the item image preview as an Img object. Caller must check validity.

      Returns Img

    • get isCompleted(): boolean

      Returns true if the item is completely downloaded.

      Returns boolean

    • get isImagePreviewAvailable(): boolean

      Returns true if an image preview is available for this item.

      Returns boolean

    • get isUpdatable(): boolean

      Returns true if the item is updatable (has a newer version available).

      Returns boolean

    • get language(): Language

      Gets the full language code for the product.

      Returns Language

    • get name(): string

      Gets the name of the associated product, translated to the interface language.

      Returns string

    • get pointerId(): any

      Returns the internal pointer id for this item.

      Returns any

    • get totalSize(): number

      Gets the size of the content in bytes.

      Returns number

    • get type(): any

      Gets the type of the product as a ContentType value.

      Returns any

    • get updateItem(): ContentStoreItem | null

      Gets the corresponding update item if an update is in progress, or null.

      Returns ContentStoreItem | null

    • get updateSize(): number

      Gets the update size in bytes if an update is available for this item.

      Returns number

    • get updateVersion(): Version

      Gets the update version if an update is available for this item.

      Returns Version

    Methods

    • Asynchronously starts or resumes the download of the content store product content. Requires automatic map rendering. Disables the cursor if enabled.

      Parameters

      • onCompleteCallback: (err: GemError) => void

        Callback for completion notification (cannot be empty).

      • options: {
            allowChargedNetworks?: boolean;
            onProgressCallback?: (progress: number) => void;
            priority?: ContentDownloadThreadPriority;
            savePolicy?: DataSavePolicy;
        } = {}

        Optional download options: onProgressCallback, allowChargedNetworks, savePolicy, priority.

      Returns EventDrivenProgressListener

      The associated EventDrivenProgressListener.

    • Cancels a previous download operation. Partially downloaded content is deleted.

      Returns GemError

    • Deletes the associated content. Operation is immediate; no notifications are triggered.

      Returns GemError

    • Releases native resources associated with this object.

      Returns void

    • Gets a binary image preview if available. Returns null if not available.

      Parameters

      Returns Uint8Array<ArrayBufferLike> | null

    • Pauses a previous download operation. Optionally provide an onComplete callback. Returns GemError.success on success, otherwise see GemError for other values.

      Parameters

      • OptionalonComplete: (err: GemError) => void

      Returns GemError