AW-6046 ng-openlayers

This commit is contained in:
2024-04-10 14:06:44 +02:00
parent 9c270bfe75
commit 4384b12944
100 changed files with 43 additions and 4228 deletions

View File

@@ -1,28 +0,0 @@
import { Input, OnDestroy, Directive } from '@angular/core';
import Source from 'ol/source/Source';
import { LayerComponent } from '../layers/layer.component';
@Directive()
// eslint-disable-next-line @angular-eslint/directive-class-suffix
export abstract class SourceComponent implements OnDestroy {
@Input()
attributions: any;
public instance: Source;
public componentType = 'source';
protected constructor(protected host: LayerComponent) {}
ngOnDestroy() {
if (this.host && this.host.instance) {
this.host.instance.setSource(null);
}
}
protected register(s: Source) {
if (this.host) {
this.host.instance.setSource(s);
}
}
}