AW6241 ng-18 adopt ng-openlayers
This commit is contained in:
42
projects/ng-openlayers/src/lib/sources/bingmaps.component.ts
Normal file
42
projects/ng-openlayers/src/lib/sources/bingmaps.component.ts
Normal file
@@ -0,0 +1,42 @@
|
||||
import { Component, Host, Input, OnInit, forwardRef } from '@angular/core';
|
||||
import { BingMaps } from 'ol/source';
|
||||
import { SourceComponent } from './source.component';
|
||||
import { LayerTileComponent } from '../layers/layertile.component';
|
||||
import { LoadFunction } from 'ol/Tile';
|
||||
|
||||
@Component({
|
||||
selector: 'aol-source-bingmaps',
|
||||
template: ` <div class="aol-source-bingmaps"></div> `,
|
||||
providers: [{ provide: SourceComponent, useExisting: forwardRef(() => SourceBingmapsComponent) }],
|
||||
})
|
||||
export class SourceBingmapsComponent extends SourceComponent implements OnInit {
|
||||
@Input()
|
||||
cacheSize: number;
|
||||
@Input()
|
||||
hidpi: boolean;
|
||||
@Input()
|
||||
culture: string;
|
||||
@Input()
|
||||
key: string;
|
||||
@Input()
|
||||
imagerySet: 'Road' | 'Aerial' | 'AerialWithLabels' | 'collinsBart' | 'ordnanceSurvey' = 'Aerial';
|
||||
@Input()
|
||||
maxZoom: number;
|
||||
@Input()
|
||||
reprojectionErrorThreshold: number;
|
||||
@Input()
|
||||
tileLoadFunction: LoadFunction;
|
||||
@Input()
|
||||
wrapX: boolean;
|
||||
|
||||
instance: BingMaps;
|
||||
|
||||
constructor(@Host() layer: LayerTileComponent) {
|
||||
super(layer);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.instance = new BingMaps(this);
|
||||
this.host.instance.setSource(this.instance);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user