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,29 @@
import { Component, OnDestroy, OnInit, Input } from '@angular/core';
import { DragPan } from 'ol/interaction';
import Kinetic from 'ol/Kinetic';
import { MapComponent } from '../map.component';
import { Condition } from 'ol/events/condition';
@Component({
selector: 'aol-interaction-dragpan',
template: '',
})
export class DragPanInteractionComponent implements OnInit, OnDestroy {
@Input()
condition: Condition;
@Input()
kinetic: Kinetic;
instance: DragPan;
constructor(private map: MapComponent) {}
ngOnInit() {
this.instance = new DragPan(this);
this.map.instance.addInteraction(this.instance);
}
ngOnDestroy() {
this.map.instance.removeInteraction(this.instance);
}
}