do not specify the source projection in ol.parser.ReadFeaturesOptions anymore
This commit is contained in:
@@ -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();
|
||||||
|
|||||||
@@ -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),
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user