Skip to content

Commit

Permalink
issue planetfederal#216 - provide featuretype Namespace param for WFS…
Browse files Browse the repository at this point in the history
… DescribeFeatureType GET
  • Loading branch information
justb4 committed Jun 17, 2014
1 parent 9b3954e commit 4c33f16
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions src/script/widgets/VectorStylesDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -385,20 +385,29 @@ gxp.VectorStylesDialog = Ext.extend(gxp.StylesDialog, {
this.wfsLayer.owsURL = layer.protocol.url.replace('?', '');
this.wfsLayer.owsType = 'WFS';
this.wfsLayer.typeName = layer.protocol.featureType;
this.wfsLayer.featureNS = layer.protocol.featureNS;
}

// Attribute types: either from WFS or local features
var self = this;
if (this.wfsLayer) {
var baseParams = {
"SERVICE": "WFS",
"VERSION": "1.1.0",
"REQUEST": "DescribeFeatureType",
"TYPENAME": this.wfsLayer.typeName
};

// NS for feature type available use it: we cannot rely on default NSs
if (this.wfsLayer.featureNS) {
baseParams["TYPENAME"] = "ns1:" + this.wfsLayer.typeName;
baseParams["NAMESPACE"] = "xmlns(ns1=" + this.wfsLayer.featureNS + ")";
}

// WFS Layer: use DescribeFeatureType to get attribute-names/types
this.attributeStore = new GeoExt.data.AttributeStore({
url: this.wfsLayer.owsURL,
baseParams: {
"SERVICE": "WFS",
"VERSION": "1.1.0",
"REQUEST": "DescribeFeatureType",
"TYPENAME": this.wfsLayer.typeName
},
baseParams: baseParams,
// method: "GET",
// disableCaching: false,
autoLoad: true,
Expand Down

0 comments on commit 4c33f16

Please sign in to comment.