Add a shape-point to the feature.
the coordinate in pixels relative to the screen that should be added to the coordinates of the feature.
Optionalnavlink: Navlink
pass this parameter in case of a Navlink feature is drawn that should start on the geometry of another Navlink, to split it's geometry automatically.
Cancel the current drawing operation.
Get the geometry of the currently drawn feature.
Get the total number of coordinates / shape-points of the currently drawn feature.
Number of coordinates
Get the active state of the drawing board.
true when active, otherwise false
Remove a shape-point. If no index is defined, the last added shape-point will be removed.
Optionalindex: number
the index of the shape-point to be removed.
Set the geometry of the currently drawn feature.
If the geometry of an area (MultiPolygon) is specified, only the first exterior is processed.
Set properties of the feature.
properties the feature will be created with.
Start a new drawing operation to shape/draw the geometry a feature by user interaction with mouse/touch "taps" on the screen.
Optionaloptions: {options to configure the drawing operation
OptionalconnectTo?: Navlinkthe Navlink feature to which the drawn Navlink should connect.
Optionallayer?: TileLayerthe layer where the feature should be created in.
Optionalmode?: "Navlink" | "Area" | "Line"the type of feature that should be drawn.
OptionalonShapeAdd?: (event: EditorEvent) => voidevent listener that's called for each shape-point that's being added by user interaction. The target of the event is the drawn shape-point DrawingShape
OptionalonShapeRemove?: (event: EditorEvent) => voidfunction that's called for each shape-point that's being removed by user interaction. The target of the event is the drawn shape-point DrawingShape
Optionalposition?: GeoPoint | PixelPointdefines the first coordinate /the starting position.
OptionalstyleGroup?: CommonStyle[]for custom draw styling.
Optionaltolerance?: numberThe tolerance in meters, used to determine the level of simplification. The simplification is applied to the LineString geometry only after drawing the geometry is complete by calling DrawingBoard.create. Tolerance has no effect if mode is set to "Area". Set tolerance to 0 to disable simplification.
The DrawingBoard is a tool to easily enable the user to draw the geometry for a feature by user interaction with mouse/touch "taps" on the screen. A feature based on the drawn geometry and custom properties can be created when the drawing operation is done.