Skip to content

Commit

Permalink
fix(filter): Set active status for empty filter array (#139)
Browse files Browse the repository at this point in the history
* replace  wfs_test pattern with expression for EqualTo

* Set active status for empty filter array

* replacement with vg_observation_v_autre_wmst
  • Loading branch information
pelord authored and mbarbeau committed Apr 17, 2018
1 parent 442836e commit 17a16be
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/demo-app/contexts/wfs_test.json
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
"type": "wfs",
"source": {
"url": "https://geoegl.msp.gouv.qc.ca/ws/igo_gouvouvert.fcgi",
"featureTypes": "vg_observation_v_inondation_embacle_wmst",
"featureTypes": "vg_observation_v_autre_wmst",
"fieldNameGeometry": "geometry",
"maxFeatures": 10000,
"version": "2.0.0",
Expand All @@ -143,7 +143,7 @@
"type": "wfs",
"source": {
"url": "https://geoegl.msp.gouv.qc.ca/ws/igo_gouvouvert.fcgi",
"featureTypes": "vg_observation_v_inondation_embacle_wmst",
"featureTypes": "vg_observation_v_autre_wmst",
"fieldNameGeometry": "geometry",
"maxFeatures": 10000,
"version": "2.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,13 @@ export class OgcFilterableItemComponent implements OnInit, OnDestroy {
this.datasource.options['wfsSource']['fieldNameGeometry']) {
fieldNameGeometry = this.datasource.options['wfsSource']['fieldNameGeometry'];
}
const status = arr.length === 0 ? true : false;
arr.push(this.datasource['ogcFilterWriter']
.addInterfaceFilter(
{
'propertyName': firstFieldName,
'operator': 'PropertyIsEqualTo',
'active': false
'active': status
}, fieldNameGeometry, lastLevel, this.defaultLogicalParent));
this.datasource.options.ogcFilters.interfaceOgcFilters = arr;
}
Expand Down

0 comments on commit 17a16be

Please sign in to comment.