Class: DrawHole

ol.interaction. DrawHole


new DrawHole(options, Style)

Interaction draw hole

Parameters:
Name Type Description
options olx.interaction.DrawHoleOptions

extend olx.interaction.DrawOptions

Properties
Name Type Description
layers Array.<ol.layer.Vector> | function | undefined

A list of layers from which polygons should be selected. Alternatively, a filter function can be provided. default: all visible layers

Style ol.style.Style | Array.<ol.style.Style> | StyleFunction | undefined

for the selected features, default: default edit style

Fires:
  • drawstart,event: drawend

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.