WPS example; support for BoundingBox in WPS format

This commit is contained in:
ahocevar
2012-03-30 18:02:24 -07:00
parent 81b67db101
commit c3fe359fa6
7 changed files with 56 additions and 10 deletions

View File

@@ -270,8 +270,8 @@ OpenLayers.Format.OWSCommon.v1 = OpenLayers.Class(OpenLayers.Format.XML, {
*/
writers: {
"ows": {
"BoundingBox": function(options) {
var node = this.createElementNSPlus("ows:BoundingBox", {
"BoundingBox": function(options, nodeName) {
var node = this.createElementNSPlus(nodeName || "ows:BoundingBox", {
attributes: {
crs: options.projection
}

View File

@@ -82,7 +82,7 @@ OpenLayers.Format.WFST.v1_0_0 = OpenLayers.Class(
// Not the superclass, only the mixin classes inherit from
// Format.GML.v2. We need this because we don't want to get readNode
// from the superclass's superclass, which is OpenLayers.Format.XML.
return OpenLayers.Format.GML.v2.prototype.readNode.apply(this, [node, obj]);
return OpenLayers.Format.GML.v2.prototype.readNode.apply(this, arguments);
},
/**

View File

@@ -81,7 +81,7 @@ OpenLayers.Format.WFST.v1_1_0 = OpenLayers.Class(
// Not the superclass, only the mixin classes inherit from
// Format.GML.v3. We need this because we don't want to get readNode
// from the superclass's superclass, which is OpenLayers.Format.XML.
return OpenLayers.Format.GML.v3.prototype.readNode.apply(this, [node, obj]);
return OpenLayers.Format.GML.v3.prototype.readNode.apply(this, arguments);
},
/**

View File

@@ -175,6 +175,9 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML, {
if (input.reference) {
this.writeNode("wps:Reference", input.reference, node);
}
if (input.boundingBoxData) {
this.writeNode("wps:BoundingBoxData", input.boundingBoxData, node);
}
return node;
},
"Data": function(data) {
@@ -228,6 +231,9 @@ OpenLayers.Format.WPSExecute = OpenLayers.Class(OpenLayers.Format.XML, {
}
return node;
},
"BoundingBoxData": function(node, obj) {
this.writers['ows']['BoundingBox'].apply(this, [node, obj, "wps:BoundingBoxData"]);
},
"Body": function(body) {
var node = this.createElementNSPlus("wps:Body", {});
if (body.wcs) {