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

@@ -31,11 +31,11 @@ ol.format.TopoJSON = function(opt_options) {
goog.base(this);
/**
* @private
* @type {ol.proj.Projection}
* @inheritDoc
*/
this.defaultProjection_ =
ol.proj.get(options.defaultProjection || 'EPSG:4326');
this.defaultDataProjection = ol.proj.get(
goog.isDefAndNotNull(options.defaultDataProjection) ?
options.defaultDataProjection : 'EPSG:4326');
};
goog.inherits(ol.format.TopoJSON, ol.format.JSONFeature);
@@ -391,7 +391,7 @@ ol.format.TopoJSON.transformVertex_ = function(vertex, scale, translate) {
* @api
*/
ol.format.TopoJSON.prototype.readProjection = function(object) {
return this.defaultProjection_;
return this.defaultDataProjection;
};