Move the check here
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
All checks were successful
FarmMaps.Develop/FarmMapsLib/pipeline/head This commit looks good
This commit is contained in:
parent
5c549c5851
commit
122c49d516
@ -211,13 +211,17 @@ 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) => {
|
||||||
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
|
if(!this._overrideSelectedItemLayer) {
|
||||||
map((feature: any) => {
|
return this.itemService$.getFeature(action.item.code, "EPSG:3857").pipe(
|
||||||
let f = this._geojsonFormat.readFeature(feature);
|
map((feature: any) => {
|
||||||
f.setId(action.item.code);
|
let f = this._geojsonFormat.readFeature(feature);
|
||||||
return new mapActions.AddFeatureSuccess(f );
|
f.setId(action.item.code);
|
||||||
}),
|
return new mapActions.AddFeatureSuccess(f );
|
||||||
catchError(error => of(new commonActions.Fail(error))));
|
}),
|
||||||
|
catchError(error => of(new commonActions.Fail(error))));
|
||||||
|
} else {
|
||||||
|
return EMPTY;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
));
|
));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user