ability to read boundedBy from FeatureCollection

This commit is contained in:
Bart van den Eijnden
2013-10-23 11:46:57 +02:00
parent d2ac206ca3
commit 3184fb02e5
4 changed files with 73 additions and 4 deletions

View File

@@ -148,6 +148,9 @@ ol.parser.ogc.GML = function(opt_options) {
'polygonMember': function(node, obj) {
this.readChildNodes(node, obj);
},
'boundedBy': function(node, obj) {
this.readChildNodes(node, obj);
},
'Point': function(node, container) {
var coordinates = [];
this.readers[this.defaultNamespaceURI]['_inherit'].apply(this,

View File

@@ -9,18 +9,22 @@ goog.require('ol.parser.ogc.WFS_v1');
/**
* @constructor
* @param {ol.parser.WFSOptions=} opt_options
* Optional configuration object.
* @extends {ol.parser.ogc.WFS_v1}
*/
ol.parser.ogc.WFS_v1_1_0 = function() {
goog.base(this);
ol.parser.ogc.WFS_v1_1_0 = function(opt_options) {
goog.base(this, opt_options);
this.version = '1.1.0';
this.schemaLocation = this.defaultNamespaceURI + ' ' +
'http://schemas.opengis.net/wfs/1.1.0/wfs.xsd';
goog.object.extend(this.readers[this.defaultNamespaceURI], {
'FeatureCollection': goog.functions.sequence(
function(node, obj) {
obj.numberOfFeatures = parseInt(
node.getAttribute('numberOfFeatures'), 10);
var numberOfFeatures = node.getAttribute('numberOfFeatures');
if (!goog.isNull(numberOfFeatures)) {
obj.numberOfFeatures = parseInt(numberOfFeatures, 10);
}
},
this.readers['http://www.opengis.net/wfs']['FeatureCollection']
),