Aw5739 ngx openlayers -> fm aol
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { Component, OnDestroy, OnInit, Input } from '@angular/core';
|
||||
import { interaction, EventsConditionType } from 'openlayers';
|
||||
import { MapComponent } from '../map.component';
|
||||
|
||||
@Component({
|
||||
selector: 'aol-interaction-dragrotateandzoom',
|
||||
template: ''
|
||||
})
|
||||
export class DragRotateAndZoomInteractionComponent implements OnInit, OnDestroy {
|
||||
instance: interaction.DragRotate;
|
||||
|
||||
@Input() condition: EventsConditionType;
|
||||
@Input() duration: number;
|
||||
|
||||
constructor(private map: MapComponent) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.instance = new interaction.DragRotateAndZoom(this);
|
||||
this.map.instance.addInteraction(this.instance);
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.map.instance.removeInteraction(this.instance);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user