new DrawRegular(options)
Parameters:
Name | Type | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
olx.interaction.TransformOptions |
Properties
|
Fires:
- drawstart, drawing, drawend,event: drawcancel
Extends
- ol.interaction.Interaction
Members
-
startAngle
-
Default start angle array for each sides
Methods
-
canRotate(b)
-
Allow rotation when centered + square
Parameters:
Name Type Description b
bool -
drawPoint_()
-
Draw sketch (Point)
-
drawSketch_()
-
Draw sketch
Returns:
The feature being drawn.
- Type
- ol.Feature
-
end_(evt)
-
End drawing
Parameters:
Name Type Description evt
ol.MapBrowserEvent Map browser event.
Returns:
false
to stop the drag sequence.- Type
- boolean
-
finishDrawing()
-
Stop drawing.
-
getGeom_()
-
Get geom of the current drawing
Returns:
- Type
- ol.geom.Polygon | ol.geom.Point
-
getSides()
-
Get the number of sides.
Returns:
number of sides.
- Type
- int
-
handleEvent_(evt)
-
Parameters:
Name Type Description evt
ol.MapBrowserEvent Map browser event.
-
handleMoveEvent_(evt)
-
Parameters:
Name Type Description evt
ol.MapBrowserEvent Event.
-
reset()
-
Reset the interaction
-
setActive(b)
-
Activate/deactivate the interaction
Parameters:
Name Type Description b
boolean -
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.
-
setSides(number)
-
Set the number of sides.
Parameters:
Name Type Description number
int of sides.
-
start_(evt)
-
Start an new draw
Parameters:
Name Type Description evt
ol.MapBrowserEvent Map browser event.
Returns:
false
to stop the drag sequence.- Type
- boolean