Use extends and super for format/Polyline

This commit is contained in:
ahocevar
2018-07-17 17:13:13 +02:00
parent 092441017d
commit 9b2b921f7b
2 changed files with 22 additions and 69 deletions
+13 -2
View File
@@ -69,7 +69,12 @@ class TextFeature {
readFeaturesFromText(text, opt_options) {}
/**
* @inheritDoc
* Read the geometry from the source.
*
* @param {Document|Node|Object|string} source Source.
* @param {module:ol/format/Feature~ReadOptions=} opt_options Read options.
* @return {module:ol/geom/Geometry} Geometry.
* @api
*/
readGeometry(source, opt_options) {
return this.readGeometryFromText(getText(source), this.adaptOptions(opt_options));
@@ -138,7 +143,13 @@ class TextFeature {
writeFeaturesText(features, opt_options) {}
/**
* @inheritDoc
* Write a single geometry in Polyline format.
*
* @function
* @param {module:ol/geom/Geometry} geometry Geometry.
* @param {module:ol/format/Feature~WriteOptions=} opt_options Write options.
* @return {string} Geometry.
* @api
*/
writeGeometry(geometry, opt_options) {
return this.writeGeometryText(geometry, this.adaptOptions(opt_options));