Add new geometryFunction option

This allows applications to control the geometry that is created from the
drawing sketch. Will e.g. be useful to create a regular polygon instead of
a circle when in Circle mode.
This commit is contained in:
Andreas Hocevar
2015-05-08 11:19:33 +02:00
parent 4e94908440
commit 250221cded
2 changed files with 97 additions and 30 deletions
+9
View File
@@ -2359,6 +2359,7 @@ olx.interaction.DragZoomOptions.prototype.style;
* type: ol.geom.GeometryType,
* minPointsPerRing: (number|undefined),
* style: (ol.style.Style|Array.<ol.style.Style>|ol.style.StyleFunction|undefined),
* geometryFunction: (ol.interaction.Draw.GeometryFunctionType|undefined),
* geometryName: (string|undefined),
* condition: (ol.events.ConditionType|undefined),
* freehandCondition: (ol.events.ConditionType|undefined)}}
@@ -2417,6 +2418,14 @@ olx.interaction.DrawOptions.prototype.minPointsPerRing;
olx.interaction.DrawOptions.prototype.style;
/**
* Function that is called when a geometry's coordinates are updated.
* @type {ol.interaction.Draw.GeometryFunctionType|undefined}
* @api
*/
olx.interaction.DrawOptions.prototype.geometryFunction;
/**
* Geometry name to use for features created by the draw interaction.
* @type {string|undefined}