diff --git a/externs/olx.js b/externs/olx.js index 72e1408807..b65465bfc2 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -5,52 +5,6 @@ let olx; -/** - * @typedef {{defaultDataProjection: ol.ProjectionLike, - * geometryName: (string|undefined), - * extractGeometryName: (boolean|undefined), - * featureProjection: ol.ProjectionLike}} - */ -olx.format.GeoJSONOptions; - - -/** - * Default data projection. Default is `EPSG:4326`. - * @type {ol.ProjectionLike} - * @api - */ -olx.format.GeoJSONOptions.prototype.defaultDataProjection; - - -/** - * Projection for features read or written by the format. Options passed to - * read or write methods will take precedence. - * @type {ol.ProjectionLike} - * @api - */ -olx.format.GeoJSONOptions.prototype.featureProjection; - - -/** - * Geometry name to use when creating features. - * @type {string|undefined} - * @api - */ -olx.format.GeoJSONOptions.prototype.geometryName; - - -/** - * Certain GeoJSON providers include the geometry_name field in the feature - * geoJSON. If set to `true` the geoJSON reader will look for that field to - * set the geometry name. If both this field is set to `true` and a - * `geometryName` is provided, the `geometryName` will take precedence. - * Default is `false`. - * @type {boolean|undefined} - * @api - */ -olx.format.GeoJSONOptions.prototype.extractGeometryName; - - /** * @typedef {{geometryName: (string|undefined)}} */ diff --git a/externs/xol.js b/externs/xol.js index b7d8186602..b37b8c250f 100644 --- a/externs/xol.js +++ b/externs/xol.js @@ -1,17 +1,4 @@ -/** - * @typedef {Object} format_GeoJSONOptions - * @property {ol.ProjectionLike} defaultDataProjection Default data projection. Default is `EPSG:4326`. - * @property {ol.ProjectionLike} featureProjection Projection for features read or written by the format. Options passed to - * read or write methods will take precedence. - * @property {string|undefined} geometryName Geometry name to use when creating features. - * @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include the geometry_name field in the feature - * geoJSON. If set to `true` the geoJSON reader will look for that field to - * set the geometry name. If both this field is set to `true` and a - * `geometryName` is provided, the `geometryName` will take precedence. - * Default is `false`. - */ - /** * @typedef {Object} format_EsriJSONOptions diff --git a/src/ol/format/GeoJSON.js b/src/ol/format/GeoJSON.js index 28e98919ff..a1ff628aac 100644 --- a/src/ol/format/GeoJSON.js +++ b/src/ol/format/GeoJSON.js @@ -19,13 +19,29 @@ import Polygon from '../geom/Polygon.js'; import {assign, isEmpty} from '../obj.js'; import {get as getProjection} from '../proj.js'; + +/** + * @typedef {Object} Options + * @property {ol.ProjectionLike} defaultDataProjection Default data projection. + * Default is `EPSG:4326`. + * @property {ol.ProjectionLike} featureProjection Projection for features read or + * written by the format. Options passed to read or write methods will take precedence. + * @property {string|undefined} geometryName Geometry name to use when creating features. + * @property {boolean|undefined} extractGeometryName Certain GeoJSON providers include + * the geometry_name field in the feature GeoJSON. If set to `true` the GeoJSON reader + * will look for that field to set the geometry name. If both this field is set to `true` + * and a `geometryName` is provided, the `geometryName` will take precedence. + * Default is `false`. + */ + + /** * @classdesc * Feature format for reading and writing data in the GeoJSON format. * * @constructor * @extends {ol.format.JSONFeature} - * @param {olx.format.GeoJSONOptions=} opt_options Options. + * @param {module:ol/format/GeoJSON~Options=} opt_options Options. * @api */ const GeoJSON = function(opt_options) {