More type fixes
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken } from '@angular/core';
|
||||
import { Component, Host, Input, Output, EventEmitter, OnInit, OnChanges, SimpleChanges, forwardRef, Inject, InjectionToken } from '@angular/core';
|
||||
import { LayerVectorComponent, SourceVectorComponent, MapComponent } from 'ngx-openlayers';
|
||||
import { ItemService,ItemTypeService,IItem, IItemType } from '@farmmaps/common';
|
||||
|
||||
import { Feature } from 'ol';
|
||||
import { Point,Geometry } from 'ol/geom';
|
||||
import { MapBrowserEvent } from 'ol';
|
||||
import { Types } from 'ol/MapBrowserEventType';
|
||||
import * as style from 'ol/style';
|
||||
import * as color from 'ol/color';
|
||||
import * as loadingstrategy from 'ol/loadingstrategy';
|
||||
@@ -87,7 +88,7 @@ export class ItemVectorSourceComponent extends SourceVectorComponent implements
|
||||
return this.getSelectedStyle(feature);
|
||||
},
|
||||
hitTolerance: 10,
|
||||
condition: (e: MapBrowserEvent) => {
|
||||
condition: (e: MapBrowserEvent<UIEvent>) => {
|
||||
return e.type == 'pointermove';
|
||||
},
|
||||
layers: [this.layer.instance as Layer<Source>]
|
||||
|
@@ -1,6 +1,8 @@
|
||||
import { Component, OnDestroy, OnInit, Input, OnChanges, SimpleChanges } from '@angular/core';
|
||||
import { LayerVectorComponent, MapComponent } from 'ngx-openlayers';
|
||||
import { RenderType } from 'ol/layer/Vector';
|
||||
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',
|
||||
@@ -12,7 +14,7 @@ export class LayerVectorImageComponent extends LayerVectorComponent implements O
|
||||
//public source: Vector;
|
||||
|
||||
@Input()
|
||||
renderMode: RenderType | string = "image";
|
||||
renderMode: RenderType<VectorSource<Geometry>> | string = "image";
|
||||
|
||||
constructor(map: MapComponent) {
|
||||
super(map);
|
||||
|
Reference in New Issue
Block a user