mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
[openlayers] ol.interaction.Draw.createBox() (#16130)
This commit is contained in:
committed by
Sheetal Nandi
parent
99d153dd1b
commit
0baf4fe3f1
Vendored
+9
@@ -5255,6 +5255,15 @@ declare module ol {
|
||||
*/
|
||||
extend(feature: ol.Feature): void;
|
||||
|
||||
/**
|
||||
* Create a `geometryFunction` that will create a box-shaped polygon (aligned
|
||||
* with the coordinate system axes). Use this with the draw interaction and
|
||||
* `type: 'Circle'` to return a box instead of a circle geometry.
|
||||
* @return {ol.DrawGeometryFunctionType} Function that draws a box-shaped polygon.
|
||||
* @api
|
||||
*/
|
||||
static createBox(): ol.DrawGeometryFunctionType;
|
||||
|
||||
/**
|
||||
* Create a `geometryFunction` for `mode: 'Circle'` that will create a regular
|
||||
* polygon with a user specified number of sides and start angle instead of an
|
||||
|
||||
@@ -662,6 +662,12 @@ draw = new ol.interaction.Draw({
|
||||
type: "Point",
|
||||
style: styleFunctionAsStyle
|
||||
});
|
||||
ol.interaction.Draw.createBox();
|
||||
ol.interaction.Draw.createRegularPolygon();
|
||||
ol.interaction.Draw.createRegularPolygon(4);
|
||||
ol.interaction.Draw.createRegularPolygon(4,0);
|
||||
|
||||
|
||||
let styleFunctionAsArray = function(feature: ol.Feature, resolution: number): ol.style.Style[] { return styleArray; }
|
||||
draw = new ol.interaction.Draw({
|
||||
type: "Point",
|
||||
|
||||
Reference in New Issue
Block a user