new DrawHole(options, Style)
Parameters:
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
olx.interaction.DrawHoleOptions | extend olx.interaction.DrawOptions Properties
|
|||||||||
Style |
ol.style.Style | Array.<ol.style.Style> | StyleFunction | undefined | for the selected features, default: default edit style |
|||||||||
options.geometryFunction |
function | undefined | Draw interaction geometry function to customize the hole |
Fires:
- event:drawstart
- event:drawend
- event:modifystart
- event:modifyend
Extends
- ol.interaction.Interaction
Methods
-
getPolygon()
-
Get the current polygon to hole
Returns:
- Type
- ol.Feature
-
removeLastPoint()
-
Remove last point of the feature currently being drawn (test if points to remove before).
-
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.