Home > @magiclane/maps-sdk > OverlayItem

OverlayItem class

Overlay Item class

This class should not be instantiated directly.

Maps & 3D Scene

Signature:

export declare class OverlayItem extends GemAutoreleaseObject 

Extends: GemAutoreleaseObject

Remarks

The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the OverlayItem class.

Properties

Property

Modifiers

Type

Description

categoryId

readonly

number

Get the category ID of the overlay item

coordinates

readonly

Coordinates

Get the coordinates of the overlay item

hasPreviewExtendedData

readonly

boolean

Check if the overlay item has preview extended data

image

readonly

Uint8Array

Get the image of the overlay item

img

readonly

Img

Get the Img object of the overlay item

name

readonly

string

Get the name of the overlay item

overlayInfo

readonly

OverlayInfo | null

Get the parent overlay info

overlayUid

readonly

number

Get the parent overlay UID

pointerId

readonly

number | bigint

previewData

readonly

SearchableParameterList

Get the preview data as a searchable parameter list

previewDataJson

readonly

any

Get the preview data as a JSON object

previewUrl

readonly

string

Get the preview URL for the overlay item

uid

readonly

number

Get the unique ID of the overlay item

Methods

Method

Modifiers

Description

cancelGetPreviewExtendedData(listener)

Cancel a running preview extended data request.

getPreviewExtendedData(onResult)

Get extended preview data asynchronously for the overlay item.

getPreviewParametersAs()

Convenience typed accessor for previewData.

T Type extending SearchableParameterList

getPTStopInfo()

Retrieve public-transport stop details when available.

This helper calls getPreviewExtendedData and converts the result to a PTStopInfo when the item belongs to CommonOverlayId.PublicTransport.

isOfType(overlayId)

Check if the overlay is of the given type