new DrawTouch(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
olx.interaction.DrawOptions |
Properties
|
Fires:
- event:drawstart
- event:drawend
- event:drawabort
Extends
Methods
-
addPoint()
-
Add a new Point to the drawing
-
finishDrawing()
-
Start drawing and add the sketch feature to the target layer. The ol.interaction.Draw.EventType.DRAWEND event is dispatched before inserting the feature.
-
getGeometryType()
-
Get geometry type
Returns:
- Type
- ol.geom.GeometryType
-
getPosition()
-
Get the position of the target
- Inherited From:
- Overrides:
Returns:
- Type
- ol.coordinate
-
removeLastPoint()
-
Remove last point of the feature currently being drawn.
-
setActive(active)
-
Activate or deactivate the interaction.
Parameters:
Name Type Description active
boolean Active.
- Overrides:
-
setGeometryType(type)
-
Set geometry type
Parameters:
Name Type Description type
ol.geom.GeometryType -
setMap(map)
-
Remove the interaction from its current map, if any, and attach it to a new map, if any. Pass
null
to just remove the interaction from the current map.Parameters:
Name Type Description map
ol.Map Map.
- Overrides: