Use geometry type enum for configuring draw interaction

This allows us to cast single-part geometries to multi-part types before adding features to the target layer.  This doesn't yet allow for drawing multi-part geometries with multiple parts.  That can be handled separately.
This commit is contained in:
Tim Schaub
2013-11-12 11:30:32 -07:00
parent 8194ba9f0a
commit 5a898884ec
4 changed files with 61 additions and 12 deletions

View File

@@ -346,8 +346,8 @@
* @property {ol.layer.Vector} layer Destination layer for the features.
* @property {number|undefined} snapTolerance Pixel distance for snapping to the
* drawing finish (default is 12).
* @property {ol.interaction.DrawMode} mode Drawing mode ('point', 'linestring',
* or 'polygon').
* @property {ol.geom.GeometryType} type Drawing type ('point', 'linestring',
* 'polygon', 'multipoint', 'multilinestring', or 'multipolygon').
* @todo stability experimental
*/