From 5e71e6ce805eaf9d94d12b9bf3ed8892a519c131 Mon Sep 17 00:00:00 2001 From: ahocevar Date: Tue, 17 Jul 2018 17:02:55 +0200 Subject: [PATCH] Use extends and super for format/OSMXML --- src/ol/format/OSMXML.js | 31 ++----------------------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/src/ol/format/OSMXML.js b/src/ol/format/OSMXML.js index 3d76a8e7c1..acd6d3bbc1 100644 --- a/src/ol/format/OSMXML.js +++ b/src/ol/format/OSMXML.js @@ -2,7 +2,6 @@ * @module ol/format/OSMXML */ // FIXME add typedef for stack state objects -import {inherits} from '../util.js'; import {extend} from '../array.js'; import Feature from '../Feature.js'; import {transformWithOptions} from '../format/Feature.js'; @@ -50,12 +49,11 @@ const PARSERS = makeStructureNS( * Feature format for reading data in the * [OSMXML format](http://wiki.openstreetmap.org/wiki/OSM_XML). * - * @extends {module:ol/format/XMLFeature} * @api */ -class OSMXML { +class OSMXML extends XMLFeature { constructor() { - XMLFeature.call(this); + super(); /** * @inheritDoc @@ -122,8 +120,6 @@ class OSMXML { writeGeometryNode(geometry, opt_options) {} } -inherits(OSMXML, XMLFeature); - /** * @const @@ -200,27 +196,4 @@ function readTag(node, objectStack) { } -/** - * Read all features from an OSM source. - * - * @function - * @param {Document|Node|Object|string} source Source. - * @param {module:ol/format/Feature~ReadOptions=} opt_options Read options. - * @return {Array.} Features. - * @api - */ -OSMXML.prototype.readFeatures; - - -/** - * Read the projection from an OSM source. - * - * @function - * @param {Document|Node|Object|string} source Source. - * @return {module:ol/proj/Projection} Projection. - * @api - */ -OSMXML.prototype.readProjection; - - export default OSMXML;