Merge pull request #3156 from fredj/format-getprojection

Move readProjectionFrom* functions to the base classes
This commit is contained in:
Frédéric Junod
2015-01-21 13:30:47 +01:00
14 changed files with 65 additions and 75 deletions

View File

@@ -501,22 +501,6 @@ ol.format.GPX.prototype.readFeaturesFromNode = function(node, opt_options) {
ol.format.GPX.prototype.readProjection;
/**
* @inheritDoc
*/
ol.format.GPX.prototype.readProjectionFromDocument = function(doc) {
return this.defaultDataProjection;
};
/**
* @inheritDoc
*/
ol.format.GPX.prototype.readProjectionFromNode = function(node) {
return this.defaultDataProjection;
};
/**
* @param {Node} node Node.
* @param {string} value Value for the link's `href` attribute.

View File

@@ -218,11 +218,3 @@ ol.format.IGC.prototype.readFeaturesFromText = function(text, opt_options) {
* @api
*/
ol.format.IGC.prototype.readProjection;
/**
* @inheritDoc
*/
ol.format.IGC.prototype.readProjectionFromText = function(text) {
return this.defaultDataProjection;
};

View File

@@ -1721,22 +1721,6 @@ ol.format.KML.prototype.readNameFromNode = function(node) {
ol.format.KML.prototype.readProjection;
/**
* @inheritDoc
*/
ol.format.KML.prototype.readProjectionFromDocument = function(doc) {
return this.defaultDataProjection;
};
/**
* @inheritDoc
*/
ol.format.KML.prototype.readProjectionFromNode = function(node) {
return this.defaultDataProjection;
};
/**
* @param {Node} node Node to append a TextNode with the color to.
* @param {ol.Color|string} color Color.

View File

@@ -234,19 +234,3 @@ ol.format.OSMXML.prototype.readFeaturesFromNode = function(node, opt_options) {
* @api stable
*/
ol.format.OSMXML.prototype.readProjection;
/**
* @inheritDoc
*/
ol.format.OSMXML.prototype.readProjectionFromDocument = function(doc) {
return this.defaultDataProjection;
};
/**
* @inheritDoc
*/
ol.format.OSMXML.prototype.readProjectionFromNode = function(node) {
return this.defaultDataProjection;
};

View File

@@ -340,14 +340,6 @@ ol.format.Polyline.prototype.readGeometryFromText =
ol.format.Polyline.prototype.readProjection;
/**
* @inheritDoc
*/
ol.format.Polyline.prototype.readProjectionFromText = function(text) {
return this.defaultDataProjection;
};
/**
* @inheritDoc
*/

View File

@@ -111,7 +111,9 @@ ol.format.TextFeature.prototype.readProjection = function(source) {
* @protected
* @return {ol.proj.Projection} Projection.
*/
ol.format.TextFeature.prototype.readProjectionFromText = goog.abstractMethod;
ol.format.TextFeature.prototype.readProjectionFromText = function(text) {
return this.defaultDataProjection;
};
/**

View File

@@ -291,14 +291,6 @@ ol.format.WKT.prototype.readGeometryFromText = function(text, opt_options) {
};
/**
* @inheritDoc
*/
ol.format.WKT.prototype.readProjectionFromText = function(text) {
return null;
};
/**
* Encode a feature as a WKT string.
*

View File

@@ -185,7 +185,9 @@ ol.format.XMLFeature.prototype.readProjection = function(source) {
* @protected
* @return {ol.proj.Projection} Projection.
*/
ol.format.XMLFeature.prototype.readProjectionFromDocument = goog.abstractMethod;
ol.format.XMLFeature.prototype.readProjectionFromDocument = function(doc) {
return this.defaultDataProjection;
};
/**
@@ -193,7 +195,9 @@ ol.format.XMLFeature.prototype.readProjectionFromDocument = goog.abstractMethod;
* @protected
* @return {ol.proj.Projection} Projection.
*/
ol.format.XMLFeature.prototype.readProjectionFromNode = goog.abstractMethod;
ol.format.XMLFeature.prototype.readProjectionFromNode = function(node) {
return this.defaultDataProjection;
};
/**