AW6241 ng-18 adopt ng-openlayers
This commit is contained in:
27
projects/ng-openlayers/src/lib/formats/mvt.component.ts
Normal file
27
projects/ng-openlayers/src/lib/formats/mvt.component.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Component, forwardRef, Input } from '@angular/core';
|
||||
import { FormatComponent } from './format.component';
|
||||
import { MVT } from 'ol/format';
|
||||
import { FeatureClass } from 'ol/Feature';
|
||||
|
||||
@Component({
|
||||
selector: 'aol-format-mvt',
|
||||
template: '',
|
||||
providers: [{ provide: FormatComponent, useExisting: forwardRef(() => FormatMVTComponent) }],
|
||||
})
|
||||
export class FormatMVTComponent extends FormatComponent {
|
||||
@Input()
|
||||
featureClass: FeatureClass;
|
||||
@Input()
|
||||
geometryName: string;
|
||||
@Input()
|
||||
layerName: string;
|
||||
@Input()
|
||||
layers: string[];
|
||||
|
||||
instance: MVT;
|
||||
|
||||
constructor() {
|
||||
super();
|
||||
this.instance = new MVT(this);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user