Skip to content

Commit

Permalink
fix(layerContextDirective.computeLayerVisibilityFromUrl): share link …
Browse files Browse the repository at this point in the history
…bug with layer id numeric (#807)

* fix computeLayerVisibilityFromUrl - bug with layer id numeric

* Update layer-context.directive.ts

Co-authored-by: Marc-André Barbeau <marc-andre.barbeau@msp.gouv.qc.ca>
  • Loading branch information
josee666 and mbarbeau committed Feb 2, 2021
1 parent bb7e601 commit 158a7a6
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -172,10 +172,10 @@ export class LayerContextDirective implements OnInit, OnDestroy {
// After, managing named layer by id (context.json OR id from datasource)
visiblelayers = visibleOnLayersParams.split(',');
invisiblelayers = visibleOffLayersParams.split(',');
if (visiblelayers.indexOf(currentLayerid) > -1) {
if (visiblelayers.indexOf(currentLayerid) > -1 || visiblelayers.indexOf(currentLayerid.toString()) > -1) {
visible = true;
}
if (invisiblelayers.indexOf(currentLayerid) > -1) {
if (invisiblelayers.indexOf(currentLayerid) > -1 || invisiblelayers.indexOf(currentLayerid.toString()) > -1) {
visible = false;
}
}
Expand Down

0 comments on commit 158a7a6

Please sign in to comment.