Skip to content

Commit

Permalink
fix(ogc-filter, style): better handling grouped layers (#581)
Browse files Browse the repository at this point in the history
* fix(*) better handling grouped layers

* refactor(share-map) Rollback for grouped layers
  • Loading branch information
pelord authored and mbarbeau committed May 11, 2020
1 parent 4e53a8d commit f0c33d5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/geo/src/lib/filter/shared/ogc-filter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -536,6 +536,7 @@ export class OgcFilterWriter {
appliedFilter = `${appliedFilter}(${processedFilter.replace('filter=', '')})`;
});
}
appliedFilter = appliedFilter.replace(/\(\)/g, '');
const filterValue = appliedFilter.length > 0 ? appliedFilter.replace('filter=', '') : undefined;
return filterValue;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ export class LayerLegendComponent implements OnInit, OnDestroy {

onChangeStyle() {
this.updateLegend();
this.layer.dataSource.ol.updateParams({STYLES: this.currentStyle});
let STYLES = '';
this.layer.dataSource.ol.getParams().LAYERS.split(',').map(layer =>
STYLES += this.currentStyle + ','
);
STYLES = STYLES.slice(0, -1);
this.layer.dataSource.ol.updateParams({STYLES});
}

onLoadImage(id: string) {
Expand Down

0 comments on commit f0c33d5

Please sign in to comment.