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

    Class OverlayItem

    Overlay Item class

    This class should not be instantiated directly.

    Hierarchy

    • GemAutoreleaseObject
      • OverlayItem
    Index

    Constructors

    • Internal

      Parameters

      • pointerId: number

      Returns OverlayItem

    Accessors

    • get categoryId(): number

      Get the category ID of the overlay item

      Returns number

      The category ID (0 if not available)

      An exception if it fails

    • get coordinates(): Coordinates

      Get the coordinates of the overlay item

      Returns Coordinates

      The coordinates of the item

      An exception if it fails

    • get hasPreviewExtendedData(): boolean

      Check if the overlay item has preview extended data

      Returns boolean

      True if preview extended data is available, false otherwise

      An exception if it fails

    • get image(): Uint8Array

      Get the image of the overlay item

      Returns Uint8Array

      The image as Uint8Array

      An exception if it fails

    • get img(): Img

      Get the Img object of the overlay item

      Returns Img

      The Img object

      An exception if it fails

    • get name(): string

      Get the name of the overlay item

      Returns string

      The name of the item (empty string if not available)

      An exception if it fails

    • get overlayInfo(): OverlayInfo | null

      Get the parent overlay info

      Returns OverlayInfo | null

      The parent overlay info if available, null otherwise

      An exception if it fails

    • get overlayUid(): number

      Get the parent overlay UID

      Returns number

      The parent overlay UID (0 if not available)

      An exception if it fails

    • get pointerId(): number

      Returns number

    • get previewDataJson(): any

      Get the preview data as a JSON object

      Returns any

      The preview data as a JSON object

      An exception if it fails

    • get previewUrl(): string

      Get the preview URL for the overlay item

      Returns string

      The preview URL (empty string if not available)

      An exception if it fails

    • get uid(): number

      Get the unique ID of the overlay item

      Returns number

      The item ID

      An exception if it fails

    Methods

    • Convenience typed accessor for previewData.

      Type Parameters

      Returns T | null

      The underlying parameters object if it is of type T, otherwise null

    • 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.

      Returns Promise<PTStopInfo | null>

      A PTStopInfo when available, otherwise null.

    • Check if the overlay is of the given type

      Parameters

      Returns boolean

      True if the overlay is of the given type, false otherwise

    • Registers an object for auto release. When the object is not used anymore, it will be released automatically from C++.

      Parameters

      • pointerId: any

        The pointer ID to register

      Returns void