diff --git a/projects/common-map/src/fm-map/effects/map.effects.ts b/projects/common-map/src/fm-map/effects/map.effects.ts index abf6ba0..75ebba4 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -211,13 +211,17 @@ export class MapEffects { selectItemSuccess$: Observable = this.actions$.pipe( ofType(mapActions.SELECTITEMSUCCESS), switchMap((action:mapActions.SelectItemSuccess) => { - return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe( - map((feature: any) => { - let f = this._geojsonFormat.readFeature(feature); - f.setId(action.item.code); - return new mapActions.AddFeatureSuccess(f ); - }), - catchError(error => of(new commonActions.Fail(error)))); + if(!this._overrideSelectedItemLayer) { + return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe( + map((feature: any) => { + let f = this._geojsonFormat.readFeature(feature); + f.setId(action.item.code); + return new mapActions.AddFeatureSuccess(f ); + }), + catchError(error => of(new commonActions.Fail(error)))); + } else { + return EMPTY; + } } ));