Introduce defaultDataProjection for formats

This commit is contained in:
tsauerwein
2014-08-18 14:28:43 +02:00
parent 1205d0fe1e
commit 539e4a23b9
17 changed files with 145 additions and 91 deletions

View File

@@ -48,7 +48,9 @@ ol.format.TextFeature.prototype.getType = function() {
* @inheritDoc
*/
ol.format.TextFeature.prototype.readFeature = function(source, opt_options) {
return this.readFeatureFromText(this.getText_(source), opt_options);
return this.readFeatureFromText(
this.getText_(source),
this.adaptOptionsWithDefaultDataProjection(opt_options));
};
@@ -65,7 +67,9 @@ ol.format.TextFeature.prototype.readFeatureFromText = goog.abstractMethod;
* @inheritDoc
*/
ol.format.TextFeature.prototype.readFeatures = function(source, opt_options) {
return this.readFeaturesFromText(this.getText_(source), opt_options);
return this.readFeaturesFromText(
this.getText_(source),
this.adaptOptionsWithDefaultDataProjection(opt_options));
};
@@ -82,7 +86,9 @@ ol.format.TextFeature.prototype.readFeaturesFromText = goog.abstractMethod;
* @inheritDoc
*/
ol.format.TextFeature.prototype.readGeometry = function(source, opt_options) {
return this.readGeometryFromText(this.getText_(source), opt_options);
return this.readGeometryFromText(
this.getText_(source),
this.adaptOptionsWithDefaultDataProjection(opt_options));
};
@@ -115,7 +121,9 @@ ol.format.TextFeature.prototype.readProjectionFromText = goog.abstractMethod;
* @inheritDoc
*/
ol.format.TextFeature.prototype.writeFeature = function(feature, opt_options) {
return this.writeFeatureText(feature, opt_options);
return this.writeFeatureText(
feature,
this.adaptOptionsWithDefaultDataProjection(opt_options));
};
@@ -133,7 +141,9 @@ ol.format.TextFeature.prototype.writeFeatureText = goog.abstractMethod;
*/
ol.format.TextFeature.prototype.writeFeatures = function(
features, opt_options) {
return this.writeFeaturesText(features, opt_options);
return this.writeFeaturesText(
features,
this.adaptOptionsWithDefaultDataProjection(opt_options));
};
@@ -151,7 +161,9 @@ ol.format.TextFeature.prototype.writeFeaturesText = goog.abstractMethod;
*/
ol.format.TextFeature.prototype.writeGeometry = function(
geometry, opt_options) {
return this.writeGeometryText(geometry, opt_options);
return this.writeGeometryText(
geometry,
this.adaptOptionsWithDefaultDataProjection(opt_options));
};