implement readers for URL endpoints in WFS 1.1
This commit is contained in:
@@ -59,7 +59,7 @@ OpenLayers.Format.WFSCapabilities.v1 = OpenLayers.Class(
|
|||||||
for(var i=0; i<children.length; ++i) {
|
for(var i=0; i<children.length; ++i) {
|
||||||
childNode = children[i];
|
childNode = children[i];
|
||||||
if(childNode.nodeType == 1) {
|
if(childNode.nodeType == 1) {
|
||||||
processor = this["read_cap_" + childNode.nodeName];
|
processor = this["read_cap_" + childNode.nodeName.replace(":", "_")];
|
||||||
if(processor) {
|
if(processor) {
|
||||||
processor.apply(this, [obj, childNode]);
|
processor.apply(this, [obj, childNode]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,6 +36,56 @@ OpenLayers.Format.WFSCapabilities.v1_1_0 = OpenLayers.Class(
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: read_cap_ows_OperationsMetadata
|
||||||
|
*/
|
||||||
|
read_cap_ows_OperationsMetadata: function(capabilities, node) {
|
||||||
|
var capability = {
|
||||||
|
request: {}
|
||||||
|
};
|
||||||
|
this.runChildNodes(capability.request, node);
|
||||||
|
capabilities.capability = capability;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: read_cap_ows_Operation
|
||||||
|
*/
|
||||||
|
read_cap_ows_Operation: function(request, node) {
|
||||||
|
var operation = {
|
||||||
|
href: {}
|
||||||
|
};
|
||||||
|
this.runChildNodes(operation.href, node);
|
||||||
|
request[node.getAttribute("name").toLowerCase()] = operation;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: read_cap_ows_DCP
|
||||||
|
*/
|
||||||
|
read_cap_ows_DCP: function(href, node) {
|
||||||
|
this.runChildNodes(href, node);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: read_cap_ows_HTTP
|
||||||
|
*/
|
||||||
|
read_cap_ows_HTTP: function(href, node) {
|
||||||
|
this.runChildNodes(href, node);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: read_cap_ows_Get
|
||||||
|
*/
|
||||||
|
read_cap_ows_Get: function(href, node) {
|
||||||
|
href["get"] = node.getAttribute("xlink:href");
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method: read_cap_ows_Post
|
||||||
|
*/
|
||||||
|
read_cap_ows_Post: function(href, node) {
|
||||||
|
href["post"] = node.getAttribute("xlink:href");
|
||||||
|
},
|
||||||
|
|
||||||
CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0"
|
CLASS_NAME: "OpenLayers.Format.WFSCapabilities.v1_1_0"
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user