Constructor options for CreateController.

Hierarchy

  • CreateControllerConstructorOptions

Properties

editor?: Editor

The Editor to use. The editor determines how creation behaves.

The Editor.getCreateHandle to get handles for creation.

Since

2022.1

finishOnSingleClick?: boolean

Indicates whether to finish creation on a single-click event, or a double-click event (the default).

The flag has effect on creation of shapes where you have to "confirm" your creation by clicking somewhere else on the map. For example, creation of a circle, where you first click somewhere on the map to place the circle, then change the position or radius of the circle and then click (or double-click, if this is false) somewhere else to finish creation.

This flag has no effect on the default point, polyline and polygon creation. Creation of these shapes already use single clicks to place points.

freehand?: boolean

Indicates whether to allow drawing shapes in "freehand" mode. When this is enabled, the user can click / tap near the last created point and drag to draw a shape. Multiple points will be inserted while the mouse is being dragged.

When this is disabled, the user can only create (single) points by clicking / tapping the map.

Since

2022.0

Default

true
handleIconStyle?: IconStyle

The style of the handles.

helperStyle?: ShapeStyle

The style that editing helper lines will be drawn in

mouseInteractionRadius?: number

The mouse interaction radius to use, in pixels.

This is the radius used for mouse events, to determine interaction with handles.

touchInteractionRadius?: number

The touch interaction radius to use, in pixels.

This is the radius used for touch events, to determine interaction with handles. Typically, this is larger than the mouseInteractionRadius.