Creates a new CreateByTemplateHandle
The edit context
The edit handle to delegate editing to
A function that is called when the user clicks a point. This function should move the shape to the clicked point, and resize it to an appropriate size. You can use getDefaultSize and getDefaultPoint to help resize the shape.
Protected
eventedThe EventedSupport used to emit events.
Typically, handles use emitEditShapeEvent to emit "EditShape" events. This is only used in advanced cases, for example when compositing multiple handles.
Protected
handlesThe list of handles that this CascadingEditHandle delegates to.
The index of the currently active handle.
2024.0
Protected
emitEmits an "EditShape"
event.
Typically, a handle emits this right after changing the shape.
The shape to emit an edit event for
The status of the edit. Typically, this is IN_PROGRESS while the handle is being dragged / changed, and EditShapeStatus.FINISHED when the drag ends.
Delegates to the currently active handle's getCursor.
Invalidates this edit handle.
This will cause onDraw and onDrawLabel to be called again.
Use this if you need to update the visualization of the handle. For example, the handle has changed style and onDraw needs to be re-evaluated.
2024.0.02
Delegates to the currently active handle's onCreateContextMenu.
Delegates to the currently active handle's onDraw.
Delegates to the currently active handle's onDrawLabel.
Delegates to the currently active handle's onGestureEvent.
Once the currently active handle finishes, the next handle becomes active.
Delegates to the currently active handle's shouldPaintFeature.
2024.0
An event that is emitted whenever this handle changes the shape of a feature.
EditShape
An event that is emitted whenever this handle is invalidated.
Invalidated
Creates a shape "by template".
After creation is started, the user clicks (or taps) once on the map to place the shape. The clicked (or tapped) point is passed into the
applyTemplate
function. That function moves the shape to the clicked point, and also changes its size so it fits the current view. You can use getDefaultSize and getDefaultPoint to easily determine an appropriate size and points for the shape.Finally, the edit handles become active. When the user is done editing the shape (by double clicking outside the shape, or a single click if finishOnSingleClick), the creation finishes.
Since
2022.1