From 5d5aa6c96d4ae9f53dcaf65479cf9411098e9058 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sun, 11 Mar 2018 22:05:19 -0600 Subject: [PATCH] Move Options to ol/format/Polyline --- externs/olx.js | 25 ------------------------- externs/xol.js | 9 --------- src/ol/format/Polyline.js | 13 +++++++++++-- 3 files changed, 11 insertions(+), 36 deletions(-) diff --git a/externs/olx.js b/externs/olx.js index 8501328d66..9780d08b8a 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,31 +5,6 @@ let olx; -/** - * @typedef {{factor: (number|undefined), - * geometryLayout: (ol.geom.GeometryLayout|undefined)}} - */ -olx.format.PolylineOptions; - - -/** - * The factor by which the coordinates values will be scaled. - * Default is `1e5`. - * @type {number|undefined} - * @api - */ -olx.format.PolylineOptions.prototype.factor; - - -/** - * Layout of the feature geometries created by the format reader. - * Default is `ol.geom.GeometryLayout.XY`. - * @type {ol.geom.GeometryLayout|undefined} - * @api - */ -olx.format.PolylineOptions.prototype.geometryLayout; - - /** * @typedef {{ * defaultDataProjection: ol.ProjectionLike, diff --git a/externs/xol.js b/externs/xol.js index b2a97786bf..f5a220ca31 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,13 +1,4 @@ -/** - * @typedef {Object} format_PolylineOptions - * @property {number|undefined} factor The factor by which the coordinates values will be scaled. - * Default is `1e5`. - * @property {ol.geom.GeometryLayout|undefined} geometryLayout Layout of the feature geometries created by the format reader. - * Default is `ol.geom.GeometryLayout.XY`. - */ - - /** * @typedef {Object} format_TopoJSONOptions * @property {ol.ProjectionLike} defaultDataProjection Default data projection. Default is `EPSG:4326`. diff --git a/src/ol/format/Polyline.js b/src/ol/format/Polyline.js index bdbe316bcb..0b25153cae 100644 --- a/src/ol/format/Polyline.js +++ b/src/ol/format/Polyline.js @@ -13,6 +13,16 @@ import {flipXY} from '../geom/flat/flip.js'; import {inflateCoordinates} from '../geom/flat/inflate.js'; import {get as getProjection} from '../proj.js'; + +/** + * @typedef {Object} Options + * @property {number|undefined} factor The factor by which the coordinates + * values will be scaled. Default is `1e5`. + * @property {ol.geom.GeometryLayout|undefined} geometryLayout Layout of the + * feature geometries created by the format reader. Default is `ol.geom.GeometryLayout.XY`. + */ + + /** * @classdesc * Feature format for reading and writing data in the Encoded @@ -20,8 +30,7 @@ import {get as getProjection} from '../proj.js'; * * @constructor * @extends {ol.format.TextFeature} - * @param {olx.format.PolylineOptions=} opt_options - * Optional configuration object. + * @param {module:ol/format/Polyline~Options=} opt_options Optional configuration object. * @api */ const Polyline = function(opt_options) {