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

    Class ContactInfo

    Contact info class

    A ContactInfo can have multiple values of the same ContactInfoFieldType.

    Changes made to this object will not be automatically reflected in associated Landmark. Use the Landmark.contactInfo setter to set the contact info for a landmark.

    Hierarchy

    • GemAutoreleaseObject
      • ContactInfo
    Index

    Constructors

    • Internal

      Parameters

      • id: number

        The pointer ID

      • mapId: number

        The map ID

      Returns ContactInfo

    Accessors

    • get fieldsCount(): number

      Gets the field count.

      Returns number

      The field count

    • get mapId(): number

      Returns number

    • get pointerId(): number

      Returns number

    Methods

    • Add a new field to the contact info

      Parameters

      • type: ContactInfoFieldType

        Field's type (multiple values of the same type are supported)

      • value: string

        Field's value

      • name: string

        Field's name (usually used for display in UI)

      Returns void

    • Gets the field name/short description. Depends on the language set. Usually used for display in UI

      Parameters

      • index: number

        Field index

      Returns string | null

      The field name for the given index, or null if no field corresponds to the given index

    • Gets the field type.

      Parameters

      • index: number

        Field index

      Returns ContactInfoFieldType | null

      The field type for the given index, or null if no field corresponds to the given index

    • Gets the field value.

      Parameters

      • index: number

        Field index

      Returns string | null

      The field value for the given index, or null if no field corresponds to the given index

    • 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

    • Removes a field specified by index. The field must already exist.

      Parameters

      • index: number

        Field index

      Returns void

    • Sets field type, value and name. The field must already exist.

      Parameters

      • index: number

        Field index

      • type: ContactInfoFieldType

        Field's type

      • value: string

        Field's value

      • name: string

        Field's name

      Returns void