File tree 1 file changed +15
-6
lines changed 1 file changed +15
-6
lines changed Original file line number Diff line number Diff line change @@ -385,20 +385,29 @@ gxp.VectorStylesDialog = Ext.extend(gxp.StylesDialog, {
385
385
this . wfsLayer . owsURL = layer . protocol . url . replace ( '?' , '' ) ;
386
386
this . wfsLayer . owsType = 'WFS' ;
387
387
this . wfsLayer . typeName = layer . protocol . featureType ;
388
+ this . wfsLayer . featureNS = layer . protocol . featureNS ;
388
389
}
389
390
390
391
// Attribute types: either from WFS or local features
391
392
var self = this ;
392
393
if ( this . wfsLayer ) {
394
+ var baseParams = {
395
+ "SERVICE" : "WFS" ,
396
+ "VERSION" : "1.1.0" ,
397
+ "REQUEST" : "DescribeFeatureType" ,
398
+ "TYPENAME" : this . wfsLayer . typeName
399
+ } ;
400
+
401
+ // NS for feature type available use it: we cannot rely on default NSs
402
+ if ( this . wfsLayer . featureNS ) {
403
+ baseParams [ "TYPENAME" ] = "ns1:" + this . wfsLayer . typeName ;
404
+ baseParams [ "NAMESPACE" ] = "xmlns(ns1=" + this . wfsLayer . featureNS + ")" ;
405
+ }
406
+
393
407
// WFS Layer: use DescribeFeatureType to get attribute-names/types
394
408
this . attributeStore = new GeoExt . data . AttributeStore ( {
395
409
url : this . wfsLayer . owsURL ,
396
- baseParams : {
397
- "SERVICE" : "WFS" ,
398
- "VERSION" : "1.1.0" ,
399
- "REQUEST" : "DescribeFeatureType" ,
400
- "TYPENAME" : this . wfsLayer . typeName
401
- } ,
410
+ baseParams : baseParams ,
402
411
// method: "GET",
403
412
// disableCaching: false,
404
413
autoLoad : true ,
You can’t perform that action at this time.
0 commit comments