Interface ILabels

Interface defining the controls and actions for labels (Label) on the map.

Hierarchy

  • ILabels

Properties

Properties

add: ((target, text, options?) => undefined | Label)

Type declaration

    • (target, text, options?): undefined | Label
    • Adds a label to the map.

      Parameters

      Returns undefined | Label

      The created label, or undefined if creation failed.

      Example

      map.Labels.add(space, 'Welcome', { appearance: { color: 'blue' } });
      
all: (() => Label[])

Type declaration

    • (): Label[]
    • Automatically adds all the labels (Label) to the map.

      The text, appearance, priority, etc. of the labels will be automatically determined based on the external data.

      Returns Label[]

      Example

      // Add all the labels to the map
      map.Labels.all();
remove: ((label) => void)

Type declaration

    • (label): void
    • Removes a Label from the map.

      Parameters

      • label: Label

        The label which should be removed.

      Returns void

      Example

      mapView.Labels.remove(space);
      
removeAll: (() => Label[])

Type declaration

    • (): Label[]
    • Removes all the labels (Label) from the map.

      Returns Label[]

      Example

      map.Labels.removeAll();