There can be more than one observedProperty per offering in SOS GetCapabilities, p=sonxurxo, r=me (closes #2548)
git-svn-id: http://svn.openlayers.org/trunk/openlayers@10314 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
+2
-2
@@ -69,7 +69,7 @@
|
|||||||
getTitleForObservedProperty: function(property) {
|
getTitleForObservedProperty: function(property) {
|
||||||
for (var name in this.SOSCapabilities.contents.offeringList) {
|
for (var name in this.SOSCapabilities.contents.offeringList) {
|
||||||
var offering = this.SOSCapabilities.contents.offeringList[name];
|
var offering = this.SOSCapabilities.contents.offeringList[name];
|
||||||
if (offering.observedProperty === property) {
|
if (offering.observedProperties[0] === property) {
|
||||||
return offering.name;
|
return offering.name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -131,7 +131,7 @@
|
|||||||
responseMode: 'inline',
|
responseMode: 'inline',
|
||||||
procedure: feature.attributes.id,
|
procedure: feature.attributes.id,
|
||||||
offering: name,
|
offering: name,
|
||||||
observedProperty: offering.observedProperty,
|
observedProperty: offering.observedProperties[0],
|
||||||
responseFormat: this.responseFormat
|
responseFormat: this.responseFormat
|
||||||
});
|
});
|
||||||
OpenLayers.Request.POST({
|
OpenLayers.Request.POST({
|
||||||
|
|||||||
@@ -115,6 +115,7 @@ OpenLayers.Format.SOSCapabilities.v1_0_0 = OpenLayers.Class(
|
|||||||
var id = this.getAttributeNS(node, this.namespaces.gml, "id");
|
var id = this.getAttributeNS(node, this.namespaces.gml, "id");
|
||||||
offeringList[id] = {
|
offeringList[id] = {
|
||||||
procedures: [],
|
procedures: [],
|
||||||
|
observedProperties: [],
|
||||||
featureOfInterestIds: [],
|
featureOfInterestIds: [],
|
||||||
responseFormats: [],
|
responseFormats: [],
|
||||||
resultModels: [],
|
resultModels: [],
|
||||||
@@ -131,8 +132,8 @@ OpenLayers.Format.SOSCapabilities.v1_0_0 = OpenLayers.Class(
|
|||||||
this.namespaces.xlink, "href"));
|
this.namespaces.xlink, "href"));
|
||||||
},
|
},
|
||||||
"observedProperty": function(node, offering) {
|
"observedProperty": function(node, offering) {
|
||||||
offering.observedProperty = this.getAttributeNS(node,
|
offering.observedProperties.push(this.getAttributeNS(node,
|
||||||
this.namespaces.xlink, "href");
|
this.namespaces.xlink, "href"));
|
||||||
},
|
},
|
||||||
"featureOfInterest": function(node, offering) {
|
"featureOfInterest": function(node, offering) {
|
||||||
offering.featureOfInterestIds.push(this.getAttributeNS(node,
|
offering.featureOfInterestIds.push(this.getAttributeNS(node,
|
||||||
|
|||||||
@@ -57,7 +57,7 @@
|
|||||||
|
|
||||||
// Contents (from SOS)
|
// Contents (from SOS)
|
||||||
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.name, "Pressure of the atmosphere", "Name of offering correctly parsed");
|
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.name, "Pressure of the atmosphere", "Name of offering correctly parsed");
|
||||||
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.observedProperty, "urn:x-ogc:def:property:OGC::BarometricPressure", "ObservedProperty correctly parsed");
|
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.observedProperties[0], "urn:x-ogc:def:property:OGC::BarometricPressure", "ObservedProperty correctly parsed");
|
||||||
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.featureOfInterestIds[0], "urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93", "Allowed value (1) for featureOfInterest correctly parsed");
|
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.featureOfInterestIds[0], "urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93", "Allowed value (1) for featureOfInterest correctly parsed");
|
||||||
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.featureOfInterestIds[1], "urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111", "Allowed value (2) for featureOfInterest correctly parsed");
|
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.featureOfInterestIds[1], "urn:ogc:object:feature:OSIRIS-HWS:efeb807b-bd24-4128-a920-f6729bcdd111", "Allowed value (2) for featureOfInterest correctly parsed");
|
||||||
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.procedures[0], "urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93", "Allowed value (1) for procedures correctly parsed");
|
t.eq(obj.contents.offeringList.ATMOSPHERIC_PRESSURE.procedures[0], "urn:ogc:object:feature:OSIRIS-HWS:3d3b239f-7696-4864-9d07-15447eae2b93", "Allowed value (1) for procedures correctly parsed");
|
||||||
|
|||||||
Reference in New Issue
Block a user