Move the check here
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good

This commit is contained in:
Willem Dantuma 2021-07-27 09:16:58 +02:00
parent 5c549c5851
commit 122c49d516

View File

@ -211,6 +211,7 @@ export class MapEffects {
selectItemSuccess$: Observable<Action> = this.actions$.pipe( selectItemSuccess$: Observable<Action> = this.actions$.pipe(
ofType(mapActions.SELECTITEMSUCCESS), ofType(mapActions.SELECTITEMSUCCESS),
switchMap((action:mapActions.SelectItemSuccess) => { switchMap((action:mapActions.SelectItemSuccess) => {
if(!this._overrideSelectedItemLayer) {
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe( return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
map((feature: any) => { map((feature: any) => {
let f = this._geojsonFormat.readFeature(feature); let f = this._geojsonFormat.readFeature(feature);
@ -218,6 +219,9 @@ export class MapEffects {
return new mapActions.AddFeatureSuccess(f ); return new mapActions.AddFeatureSuccess(f );
}), }),
catchError(error => of(new commonActions.Fail(error)))); catchError(error => of(new commonActions.Fail(error))));
} else {
return EMPTY;
}
} }
)); ));