Aw5739 ngx openlayers -> fm aol

This commit is contained in:
2023-12-28 12:29:57 +01:00
parent 0c10d998a1
commit eb9a8489b8
96 changed files with 8078 additions and 3791 deletions

View File

@@ -0,0 +1,30 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { control, Extent } from 'openlayers';
import { MapComponent } from '../map.component';
@Component({
selector: 'aol-control-zoomtoextent',
template: `<ng-content></ng-content>`
})
export class ControlZoomToExtentComponent implements OnInit, OnDestroy {
instance: control.ZoomToExtent;
@Input() className: string;
@Input() label: (string | Node);
@Input() tipLabel: string;
@Input() extent: Extent;
constructor(private map: MapComponent) {
// console.log('instancing aol-control-zoomtoextent');
}
ngOnInit() {
this.instance = new control.ZoomToExtent(this);
this.map.instance.addControl(this.instance);
}
ngOnDestroy() {
// console.log('removing aol-control-zoomtoextent');
this.map.instance.removeControl(this.instance);
}
}