Move the check here
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good Details

2022.01
Willem Dantuma 2021-07-27 09:16:58 +02:00
parent 5c549c5851
commit 122c49d516
1 changed files with 11 additions and 7 deletions

View File

@ -211,13 +211,17 @@ export class MapEffects {
selectItemSuccess$: Observable<Action> = 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;
}
}
));