Composes a chain of controllers.

This controller allows you to chain multiple controllers together, one after the other. Events are forwarded down the chain, until the first controller handles the event.

Use appendController to add controllers to the chain.

See the Managing user input with LuciadRIA controllers tutorial for more information.

Since

2022.1

Hierarchy

Constructors

Accessors

  • get cursor(): null | string
  • The CSS cursor to use on the map, for this controller. If null, the map will fall back to the previous cursor that was set on the map.

    Note that changing this cursor will update the cursor on the map's DOM node. When using multiple controllers (e.g. in a CompositeController), the controller that updates the cursor last (to a non-null value), will override any other non-null cursors of active controllers on the map.

    Returns null | string

    See

    Map.cursorManager

    Since

    2022.1

  • set cursor(cssCursor): void
  • Parameters

    • cssCursor: null | string

    Returns void

  • get map(): null | Map
  • The map on which this controller is currently active or null if this controller is not currently active. This property is read-only.

    Returns null | Map

  • set map(_value): void
  • Parameters

    • _value: null | Map

    Returns void

Methods

  • Chains a new controller to this CompositeController. Note that you cannot append controllers while the CompositeController is active on the map.

    Parameters

    • controller: Controller

      The new controller to append to the chain of controllers

    Returns void

  • Called when the controller becomes active on the map. Controller.onActivate is called for every controller in the chain.

    Parameters

    • map: Map

      the map on which the controller has been activated

    Returns void

  • Callback for drawing shapes on the map. Controller.onDraw is called for every controller in the chain.

    Parameters

    • geoCanvas: GeoCanvas

      The geoCanvas to draw on

    Returns void

Events

"Activated" event

  • on("Activated", callback: ((map) => void), context?: any) : Handle
  • An event indicating that this Controller has been activated. Activated means that the controller is active on the map, and the controller's onActivate has been called.

    You can use this event to set up UI elements or other listeners related to the controller and the controller's map.

    Parameters

    • event: "Activated"
    • callback: ((map) => void)
        • (map): void
        • Parameters

          Returns void

    • Optional context: any

    Returns Handle

    Since

    2021.0

"Deactivated" event

  • on("Deactivated", callback: ((map) => void), context?: any) : Handle
  • An event indicating that this Controller has been deactivated. Deactivated means that the controller has been removed from the map, and the controller's onDeactivate has been called.

    You can use this event to clean up UI elements or other listeners related to the controller and the controller's map.

    Parameters

    • event: "Deactivated"
    • callback: ((map) => void)
        • (map): void
        • Parameters

          Returns void

    • Optional context: any

    Returns Handle

    Since

    2021.0

"Invalidated" event

  • on("Invalidated", callback: (() => void), context?: any) : Handle
  • An event indicating that this Controller is invalidated. Invalidated means that the Controller requests for its onDraw to be called during the next rendering pass (because its appearance has changed). This event fires when invalidate is called.

    Parameters

    • event: "Invalidated"
    • callback: (() => void)
        • (): void
        • Returns void

    • Optional context: any

    Returns Handle