AW6241 ng-18 adopt ng-openlayers

This commit is contained in:
2024-09-05 08:50:27 +02:00
parent 1bddc28767
commit 07d6c1bc10
92 changed files with 4148 additions and 1 deletions

View File

@@ -0,0 +1,27 @@
import { Component, OnDestroy, OnInit, SkipSelf, Optional } from '@angular/core';
import { Group } from 'ol/layer';
import { LayerComponent } from './layer.component';
import { MapComponent } from '../map.component';
@Component({
selector: 'aol-layer-group',
template: ` <ng-content></ng-content> `,
})
export class LayerGroupComponent extends LayerComponent implements OnInit, OnDestroy {
public instance: Group;
constructor(
map: MapComponent,
@SkipSelf()
@Optional()
group?: LayerGroupComponent
) {
super(group || map);
}
ngOnInit() {
// console.log(`creating ol.layer.Group instance with:`, this);
this.instance = new Group(this);
super.ngOnInit();
}
}