Options
All
  • Public
  • Public/Protected
  • All
Menu

Controller used to graphically edit existing objects in a layer on the view.

Editing is supported for all shapes available in ShapeFactory. Supported editing operations include moving the entire shape, moving individual vertices or control points, adding vertices, and deleting vertices.

Editing is supported on regular 2D maps as well as WebGL 2D or 3D maps.

However, only 2D shapes or 2D aspects of 3D shapes are editable. For example, you can edit the base shape of an extruded shape.

Hierarchy

Implements

Overview

Constructors

constructor

Events

on

  • (event: "Activated", callback: (map: Map) => void, context?: any): Handle
  • (event: "Deactivated", callback: (map: Map) => void, context?: any): Handle
  • (event: "Invalidated", callback: () => 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.

    since

    2021.0

    Parameters

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

          Returns void

    • Optional context: any

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

    since

    2021.0

    Parameters

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

          Returns void

    • Optional context: any

    Returns 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

Accessors

map

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

    Returns Map | null

  • The map on which this controller is currently active or null if this controller is not currently active. This property is read-only.

    Parameters

    • _value: Map | null

    Returns any

Methods

getMaximumPointCount

  • (): number
  • Return the maximum number of points that should be allowed during editing.

    Returns number

getMinimumPointCount

  • (): number
  • Return the minimum number of points that should be allowed during editing.

    Returns number

invalidate

  • (): void
  • Call this method to indicate that the controller's appearance has changed. Calling this method ensures the onDraw will be called during the next rendering pass.

    Returns void

onActivate

  • (aMapView: Map): void

onDeactivate

  • (aMapView: Map): Promise<void> | void

onDraw

onDrawLabel

onGestureEvent

onKeyEvent

  • Called when a key event has been received. This method must return a HandleEventResult value to indicate if the event was handled or not, If this method returns EVENT_IGNORED, the map will be given the opportunity to perform default key event behaviour. If default event handling is not desired, this method should return EVENT_HANDLED. (See the Controller class description for the default behavior.)

    Parameters

    • keyEvent: KeyEvent

      The key event to be handled. Note that this is a KeyEvent and not a DOMEvent. You can access the corresponding DOMEvent through KeyEvent.domEvent.

    Returns HandleEventResult

    The key event handling result.

setPointCount

  • (aMinimumPointCount: number, aMaximumPointCount: number): void
  • Set the minimum and maximum number of points that should allowed during editing using this controller. Once the maximum number of points is reached, the controller will not allow insertion of new points. Once the minimum number of points is reached, the controller will not allow deletion of new points. Note that this method should be called before the edit controller is activated on the map, subsequent calls to this method will be ignored.

    Parameters

    • aMinimumPointCount: number

      The minimum number of points that should be allowed during editing.

    • aMaximumPointCount: number

      The maximum number of points that should be allowed during editing. Set to -1 if not specified.

    Returns void

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method