getProjection method on parsers

With this, vector sources/layers do not need to make
assumptions on the data projection.
This commit is contained in:
ahocevar
2013-07-22 15:02:08 +02:00
parent 82a158bdd2
commit 55697dea28
4 changed files with 21 additions and 6 deletions

View File

@@ -2,7 +2,6 @@ goog.provide('ol.source.Vector');
goog.require('goog.asserts');
goog.require('goog.net.XhrIo');
goog.require('ol.proj');
goog.require('ol.source.Source');
@@ -39,7 +38,7 @@ ol.source.Vector = function(options) {
/**
* @private
* @type {ol.parser.Parser}
* @type {ol.parser.FeatureParser}
*/
this.parser_ = goog.isDef(options.parser) ? options.parser : null;
@@ -53,8 +52,7 @@ ol.source.Vector = function(options) {
attributions: options.attributions,
extent: options.extent,
logo: options.logo,
projection: goog.isDef(options.projection) ?
options.projection : ol.proj.get('EPSG:4326')
projection: options.projection
});
};
goog.inherits(ol.source.Vector, ol.source.Source);