import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
import { LayerVectorComponent, MapComponent } from '@farmmaps/ng-openlayers';
import  RenderType  from 'ol/layer/Vector';
import { Vector as VectorSource } from 'ol/source';
import { Geometry } from 'ol/geom';
import Feature from 'ol/Feature';

@Component({
  selector: 'fm-map-aol-layer-vector-image',
  template: `
    <ng-content></ng-content>
  `,
})
export class LayerVectorImageComponent extends LayerVectorComponent implements OnInit, OnDestroy, OnChanges {
  //public source: Vector;

  @Input()
  renderMode: RenderType<VectorSource<Feature<Geometry>>> | string = "image";  

  constructor(map: MapComponent) {
    super(map);
  }

  ngOnInit() {
    super.ngOnInit();
  }

  ngOnChanges(changes: SimpleChanges) {
    super.ngOnChanges(changes);
  }
}
