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

@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<Geometry>> | string = "image";  

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

  ngOnInit() {
    super.ngOnInit();
  }

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