AW-6046 Angular 17
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
Some checks failed
FarmMaps.Develop/FarmMapsLib/pipeline/head There was a failure building this commit
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user