MapLayr
    Preparing search index...

    Class Annotation

    A single annotation.

    Annotation#click - Fired when the user clicks on the annotation.

    Hierarchy

    Index

    Configuring Annotations

    Configuring Layout

    Creating Annotations

    Other

    Configuring Annotations

    Configuring Layout

    • get anchor(): { x: number; y: number }

      The proportional anchor point of the element.

      Returns { x: number; y: number }

      A value of { x: 0, y: 0 } would render the annotation such that the top-left of its bounding box would be at the specified position.

      Updating this value will affect the annotation on the screen.

    • set anchor(newValue: { x: number; y: number }): void

      Parameters

      • newValue: { x: number; y: number }

      Returns void

    • get anchorOffset(): { x: number; y: number }

      The relative anchor point of the element in CSS pixels.

      Returns { x: number; y: number }

      The anchor offset is applied additionally to the anchor.

      Updating this value will affect the annotation on the screen.

    • set anchorOffset(newValue: { x: number; y: number }): void

      Parameters

      • newValue: { x: number; y: number }

      Returns void

    Creating Annotations

    Other

    • The addEventListener() method of the EventTarget interface sets up a function that will be called whenever the specified event is delivered to the target.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | AddEventListenerOptions

      Returns void

    • The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order. The normal event processing rules (including the capturing and optional bubbling phase) also apply to events dispatched manually with dispatchEvent().

      MDN Reference

      Parameters

      Returns boolean

    • The removeEventListener() method of the EventTarget interface removes an event listener previously registered with EventTarget.addEventListener() from the target. The event listener to be removed is identified using a combination of the event type, the event listener function itself, and various optional options that may affect the matching process; see Matching event listeners for removal.

      MDN Reference

      Parameters

      • type: string
      • callback: EventListenerOrEventListenerObject | null
      • Optionaloptions: boolean | EventListenerOptions

      Returns void