Handle concrete classes with non implemented abstract methods
This commit is contained in:
@@ -223,3 +223,11 @@ ol.format.IGC.prototype.writeFeaturesText = function(features, opt_options) {};
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.IGC.prototype.writeGeometryText = function(geometry, opt_options) {};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.IGC.prototype.readGeometryFromText = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
@@ -253,3 +253,43 @@ ol.format.MVT.readGeometry_ = function(rawFeature) {
|
||||
|
||||
return geom;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.MVT.prototype.readFeature = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.MVT.prototype.readGeometry = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.MVT.prototype.writeFeature = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.MVT.prototype.writeGeometry = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.MVT.prototype.writeFeatures = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
@@ -416,3 +416,19 @@ ol.format.TopoJSON.prototype.writeFeaturesObject = function(features, opt_option
|
||||
* @inheritDoc
|
||||
*/
|
||||
ol.format.TopoJSON.prototype.writeGeometryObject = function(geometry, opt_options) {};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.TopoJSON.prototype.readGeometryFromObject = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @override
|
||||
*/
|
||||
ol.format.TopoJSON.prototype.readFeatureFromObject = function() {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
+21
-12
@@ -7,6 +7,9 @@ goog.require('ol.format.FormatType');
|
||||
goog.require('ol.xml');
|
||||
|
||||
|
||||
/* eslint-disable valid-jsdoc */
|
||||
|
||||
|
||||
/**
|
||||
* @classdesc
|
||||
* Abstract base class; normally only used for creating subclasses and not
|
||||
@@ -73,12 +76,13 @@ ol.format.XMLFeature.prototype.readFeatureFromDocument = function(
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Node} node Node.
|
||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
||||
* @return {ol.Feature} Feature.
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {};
|
||||
ol.format.XMLFeature.prototype.readFeatureFromNode = function(node, opt_options) {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -148,23 +152,25 @@ ol.format.XMLFeature.prototype.readGeometry = function(source, opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Document} doc Document.
|
||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {};
|
||||
ol.format.XMLFeature.prototype.readGeometryFromDocument = function(doc, opt_options) {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Node} node Node.
|
||||
* @param {olx.format.ReadOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {ol.geom.Geometry} Geometry.
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {};
|
||||
ol.format.XMLFeature.prototype.readGeometryFromNode = function(node, opt_options) {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -214,13 +220,14 @@ ol.format.XMLFeature.prototype.writeFeature = function(feature, opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.Feature} feature Feature.
|
||||
* @param {olx.format.WriteOptions=} opt_options Options.
|
||||
* @protected
|
||||
* @return {Node} Node.
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.writeFeatureNode = function(feature, opt_options) {};
|
||||
ol.format.XMLFeature.prototype.writeFeatureNode = function(feature, opt_options) {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -233,12 +240,13 @@ ol.format.XMLFeature.prototype.writeFeatures = function(features, opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {Array.<ol.Feature>} features Features.
|
||||
* @param {olx.format.WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.writeFeaturesNode = function(features, opt_options) {};
|
||||
ol.format.XMLFeature.prototype.writeFeaturesNode = function(features, opt_options) {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
@@ -251,9 +259,10 @@ ol.format.XMLFeature.prototype.writeGeometry = function(geometry, opt_options) {
|
||||
|
||||
|
||||
/**
|
||||
* @abstract
|
||||
* @param {ol.geom.Geometry} geometry Geometry.
|
||||
* @param {olx.format.WriteOptions=} opt_options Options.
|
||||
* @return {Node} Node.
|
||||
*/
|
||||
ol.format.XMLFeature.prototype.writeGeometryNode = function(geometry, opt_options) {};
|
||||
ol.format.XMLFeature.prototype.writeGeometryNode = function(geometry, opt_options) {
|
||||
throw new Error('Not implemented');
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user