Changing extent structure back to single array: [minX, minY, maxX, maxY]
This means we'll have to have a new structure and new methods for 3D envelopes.
This commit is contained in:
@@ -2,7 +2,6 @@ goog.provide('ol.parser.ogc.GML_v2');
|
||||
|
||||
goog.require('goog.array');
|
||||
goog.require('goog.object');
|
||||
goog.require('ol.extent');
|
||||
goog.require('ol.parser.ogc.GML');
|
||||
|
||||
|
||||
@@ -36,7 +35,10 @@ ol.parser.ogc.GML_v2 = function(opt_options) {
|
||||
[node, coordinates, container]);
|
||||
this.readChildNodes(node, coordinates);
|
||||
container.projection = node.getAttribute('srsName');
|
||||
container.bounds = ol.extent.clone(coordinates[0]);
|
||||
container.bounds = [
|
||||
coordinates[0][0][0], coordinates[0][0][1],
|
||||
coordinates[0][1][0], coordinates[0][1][1]
|
||||
];
|
||||
}
|
||||
});
|
||||
goog.object.extend(this.writers['http://www.opengis.net/gml'], {
|
||||
@@ -104,7 +106,11 @@ ol.parser.ogc.GML_v2 = function(opt_options) {
|
||||
},
|
||||
'Box': function(extent) {
|
||||
var node = this.createElementNS('gml:Box');
|
||||
this.writeNode('coordinates', extent, null, node);
|
||||
var coordinates = [
|
||||
[extent[0], extent[1]],
|
||||
[extent[2], extent[3]]
|
||||
];
|
||||
this.writeNode('coordinates', coordinates, null, node);
|
||||
// srsName attribute is optional for gml:Box
|
||||
if (goog.isDefAndNotNull(this.srsName)) {
|
||||
node.setAttribute('srsName', this.srsName);
|
||||
|
||||
Reference in New Issue
Block a user