ol.interaction. ol.interaction.Draw

new Draw

Stability: experimental

Interaction that allows drawing geometries

Parameters:
Name Type Description
options olx.interaction.DrawOptions

Options.

Properties
Name Type Description
features ol.Collection | undefined

Destination collection for the drawn features.

source ol.source.Vector | undefined

Destination source for the drawn features.

snapTolerance number | undefined

Pixel distance for snapping to the drawing finish (default is 12).

type ol.geom.GeometryType

Drawing type ('Point', 'LineString', 'Polygon', 'MultiPoint', 'MultiLineString', or 'MultiPolygon').

minPointsPerRing number | undefined

The number of points that must be drawn before a polygon ring can be finished (default is 3).

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

Style for sketch features.

Source:
  • drawinteraction.js, line 75
Fires:

Extends

  • ol.interaction.Pointer