[openlayers] DrawGeometryFunctionType: second argument is optional (#16678)

This commit is contained in:
Krzysztof Rzymkowski
2017-06-02 07:30:21 -07:00
committed by Andy
parent 9e53c56b13
commit 4bb4158c7f
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -11154,7 +11154,7 @@ declare module ol {
* Array.<Array.<ol.Coordinate>>), ol.geom.SimpleGeometry=):
* ol.geom.SimpleGeometry}
*/
type DrawGeometryFunctionType = (coords: (ol.Coordinate | ol.Coordinate[] | ol.Coordinate[][]), geo: ol.geom.SimpleGeometry) => ol.geom.SimpleGeometry;
type DrawGeometryFunctionType = (coords: (ol.Coordinate | ol.Coordinate[] | ol.Coordinate[][]), geo?: ol.geom.SimpleGeometry) => ol.geom.SimpleGeometry;
/**
* A function that takes an {@link ol.MapBrowserEvent} and returns a
+2
View File
@@ -19,6 +19,8 @@ let featureStyleFunction: ol.FeatureStyleFunction;
let featureLoader: ol.FeatureLoader;
let easingFunction: (t: number) => number;
let drawGeometryFunction: ol.DrawGeometryFunctionType;
drawGeometryFunction([0,0], new ol.geom.Point([0,0]));
drawGeometryFunction([0,0]);
// Type variables for OpenLayers
let attribution: ol.Attribution;