Fix setExtent
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
0485c163ad
commit
dcc24aa149
@ -154,14 +154,15 @@ export class MapEffects {
|
||||
@Effect()
|
||||
zoomToExtent2$: Observable<Action> = this.actions$.pipe(
|
||||
ofType(mapActions.SETFEATURES),
|
||||
map((action: mapActions.SetFeatures) => {
|
||||
switchMap((action: mapActions.SetFeatures) => {
|
||||
let extent = createEmpty();
|
||||
if (extent) {
|
||||
for (let f of action.features) {
|
||||
extend(extent, (f as Feature).getGeometry().getExtent());
|
||||
}
|
||||
if(action.features.length>0) return of(new mapActions.SetExtent(extent));
|
||||
}
|
||||
return new mapActions.SetExtent(extent);
|
||||
return EMPTY;
|
||||
}));
|
||||
|
||||
@Effect()
|
||||
|
Loading…
Reference in New Issue
Block a user