diff --git a/externs/olx.js b/externs/olx.js index b0fd30c027..16af4ed0c2 100644 --- a/externs/olx.js +++ b/externs/olx.js @@ -1167,6 +1167,27 @@ olx.format.ReadOptions.prototype.dataProjection; olx.format.ReadOptions.prototype.featureProjection; +/** + * @typedef {{dataProjection: (ol.proj.ProjectionLike|undefined), + * featureProjection: ol.proj.ProjectionLike}} + */ +olx.format.WriteOptions; + + +/** + * Projection of the data we are writing. Default is the `featureProjection`. + * @type {ol.proj.ProjectionLike|undefined} + */ +olx.format.WriteOptions.prototype.dataProjection; + + +/** + * Projection of the feature geometries serialized by the format writer. + * @type {ol.proj.ProjectionLike} + */ +olx.format.WriteOptions.prototype.featureProjection; + + /** * @typedef {{defaultProjection: ol.proj.ProjectionLike, * geometryName: (string|undefined)}} @@ -1203,7 +1224,6 @@ olx.format.PolylineOptions; olx.format.PolylineOptions.prototype.factor; - /** * @typedef {{defaultProjection: ol.proj.ProjectionLike}} * @api diff --git a/src/ol/format/featureformat.js b/src/ol/format/featureformat.js index c466747771..83ae7e6c18 100644 --- a/src/ol/format/featureformat.js +++ b/src/ol/format/featureformat.js @@ -74,6 +74,7 @@ ol.format.Feature.prototype.readProjection = goog.abstractMethod; * Encode a feature in this format. * * @param {ol.Feature} feature Feature. + * @param {olx.format.WriteOptions=} opt_options Write options. * @return {ArrayBuffer|Node|Object|string} Result. */ ol.format.Feature.prototype.writeFeature = goog.abstractMethod; @@ -83,6 +84,7 @@ ol.format.Feature.prototype.writeFeature = goog.abstractMethod; * Encode an array of features in this format. * * @param {Array.