srsName should be optional in BBOX

This commit is contained in:
Bart van den Eijnden
2013-10-22 16:24:07 +02:00
parent 67f00b37e8
commit dc58d4e562
2 changed files with 6 additions and 3 deletions

View File

@@ -91,12 +91,14 @@ ol.parser.ogc.Filter_v1_0_0 = function() {
goog.asserts.assert(args[1] instanceof ol.expr.Literal);
goog.asserts.assert(args[2] instanceof ol.expr.Literal);
goog.asserts.assert(args[3] instanceof ol.expr.Literal);
goog.asserts.assert(args[4] instanceof ol.expr.Literal);
var bbox = [
args[0].getValue(), args[1].getValue(),
args[2].getValue(), args[3].getValue()
];
var projection = args[4].getValue();
var projection;
if (args[4] instanceof ol.expr.Literal) {
projection = args[4].getValue();
}
var property = args[5];
// PropertyName is mandatory in 1.0.0, but e.g. GeoServer also
// accepts filters without it.

View File

@@ -54,7 +54,8 @@ ol.parser.ogc.GML_v2 = function(opt_options) {
for (var i = 0; i < numCoordinates; ++i) {
var coord = coordinates[i];
var part = goog.array.concat(coord);
if (this.axisOrientation.substr(0, 2) !== 'en') {
if (goog.isDef(this.axisOrientation) &&
this.axisOrientation.substr(0, 2) !== 'en') {
part[0] = coord[1];
part[1] = coord[0];
}