do not specify the source projection in ol.parser.ReadFeaturesOptions anymore

This commit is contained in:
Bart van den Eijnden
2013-05-15 15:34:11 +02:00
parent 2ad3ee6f99
commit e8ed1674ea
4 changed files with 3 additions and 8 deletions

View File

@@ -41,7 +41,7 @@ var map = new ol.Map({
}) })
}); });
var gml = new ol.parser.ogc.GML_v3(); var gml = new ol.parser.ogc.GML_v3({axisOrientation: 'neu'});
var url = 'data/gml/topp-states-wfs.xml'; var url = 'data/gml/topp-states-wfs.xml';
var xhr = new XMLHttpRequest(); var xhr = new XMLHttpRequest();

View File

@@ -349,8 +349,7 @@ ol.layer.Vector.prototype.parseFeatures = function(data, parser, projection) {
this.addFeatures(features); this.addFeatures(features);
}; };
var options = {callback: callback, projection: var options = {callback: callback};
this.getSource().getProjection()};
if (goog.isString(data)) { if (goog.isString(data)) {
if (goog.isFunction(parser.readFeaturesFromStringAsync)) { if (goog.isFunction(parser.readFeaturesFromStringAsync)) {
parser.readFeaturesFromStringAsync(data, goog.bind(addFeatures, this), parser.readFeaturesFromStringAsync(data, goog.bind(addFeatures, this),

View File

@@ -97,7 +97,6 @@ ol.parser.ReadFeaturesCallback;
/** /**
* @typedef {{callback: ol.parser.ReadFeaturesCallback, * @typedef {{callback: ol.parser.ReadFeaturesCallback}}
* projection: ol.Projection}}
*/ */
ol.parser.ReadFeaturesOptions; ol.parser.ReadFeaturesOptions;

View File

@@ -552,8 +552,5 @@ ol.parser.ogc.GML.prototype.createGeometry_ = function(container,
ol.parser.ogc.GML.prototype.readFeaturesFromString = ol.parser.ogc.GML.prototype.readFeaturesFromString =
function(str, opt_options) { function(str, opt_options) {
this.readFeaturesOptions_ = opt_options; this.readFeaturesOptions_ = opt_options;
if (goog.isDef(opt_options) && goog.isDef(opt_options.projection)) {
this.axisOrientation = opt_options.projection.getAxisOrientation();
}
return this.read(str).features; return this.read(str).features;
}; };