Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(context): set map zoom level after importing context #1324

Closed
wants to merge 11 commits into from
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,10 @@ export class LayerContextDirective implements OnInit, OnDestroy {
this.layerService.createAsyncIdbLayers(context.uri).pipe(debounceTime(500))
.subscribe((layers: Layer[]) => this.handleAddLayers(layers));

if(context.map.view.keepCurrentView) {
this.map.setView(context.map.view);
}
alecarn marked this conversation as resolved.
Show resolved Hide resolved

}

private handleAddLayers(layers: Layer[]) {
Expand Down