From 7d52a9b8c4c7903aa13d5aac52c601cdbc58a6be Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 11 Mar 2018 22:29:36 -0600 Subject: [PATCH] Move Options to ol/format/WKT --- externs/olx.js | 15 --------------- externs/xol.js | 7 ------- src/ol/format/WKT.js | 9 ++++++++- 3 files changed, 8 insertions(+), 23 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 349b1f8552..ca44065d92 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,21 +5,6 @@ let olx; -/** - * @typedef {{splitCollection: (boolean|undefined)}} - */ -olx.format.WKTOptions; - - -/** - * Whether to split GeometryCollections into - * multiple features on reading. Default is `false`. - * @type {boolean|undefined} - * @api - */ -olx.format.WKTOptions.prototype.splitCollection; - - /** * @typedef {{ * layers: (Array.|undefined) diff --git a/externs/xol.js b/externs/xol.js index 29306696dc..6a9d340840 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,11 +1,4 @@ -/** - * @typedef {Object} format_WKTOptions - * @property {boolean|undefined} splitCollection Whether to split GeometryCollections into - * multiple features on reading. Default is `false`. - */ - - /** * @typedef {Object} format_WMSGetFeatureInfoOptions * @property {Array.|undefined} layers If set, only features of the given layers will be returned by the format diff --git a/src/ol/format/WKT.js b/src/ol/format/WKT.js index 3c06cd4f9c..e07deec019 100644 --- a/src/ol/format/WKT.js +++ b/src/ol/format/WKT.js @@ -17,6 +17,13 @@ import Polygon from '../geom/Polygon.js'; import SimpleGeometry from '../geom/SimpleGeometry.js'; +/** + * @typedef {Object} Options + * @property {boolean|undefined} splitCollection Whether to split GeometryCollections into + * multiple features on reading. Default is `false`. + */ + + /** * @const * @type {string} @@ -526,7 +533,7 @@ Parser.prototype.formatErrorMessage_ = function() { * * @constructor * @extends {ol.format.TextFeature} - * @param {olx.format.WKTOptions=} opt_options Options. + * @param {module:ol/format/WKT~Options=} opt_options Options. * @api */ const WKT = function(opt_options) {