From 1e353fc229860018986d42bfd42fb1a8fcc5797b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-=C3=89tienne=20Lord?= <7397743+pelord@users.noreply.github.com> Date: Thu, 7 Dec 2017 10:39:28 -0500 Subject: [PATCH] fix(layer): This suscribe was not referencing to named id (#113) * This suscribe was not referencing to named id This suscribe was not using the named id as defined into the context.json * lint error --- src/lib/context/shared/layer-context.directive.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/context/shared/layer-context.directive.ts b/src/lib/context/shared/layer-context.directive.ts index 44dd314abd..68aa4972d5 100644 --- a/src/lib/context/shared/layer-context.directive.ts +++ b/src/lib/context/shared/layer-context.directive.ts @@ -68,7 +68,9 @@ export class LayerContextDirective implements OnInit, OnDestroy { this.dataSourceService .createAsyncDataSource(dataSourceContext) .subscribe(dataSource => { - this.getLayerParamVisibilityUrl(dataSource.id, layerContext); + this.getLayerParamVisibilityUrl( + dataSource.options['id'] ? + dataSource.options['id'] : dataSource.id , layerContext); this.map.addLayer( this.layerService.createLayer(dataSource, layerContext)); });