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 4e17cf7..d26b101 100644 --- a/projects/common-map/src/fm-map/effects/map.effects.ts +++ b/projects/common-map/src/fm-map/effects/map.effects.ts @@ -150,8 +150,10 @@ export class MapEffects { for (let f of action.features) { extend(extent, (f as Feature).getGeometry().getExtent()); } + if(action.features && action.features.length >0) { + actions.push(new mapActions.SetExtent(extent)); + } } - actions.push(new mapActions.SetExtent(extent)); } return actions; }));