Refactoring types
This commit is contained in:
@@ -29,6 +29,7 @@ import {commonReducers} from '@farmmaps/common';
|
||||
import {commonActions} from '@farmmaps/common';
|
||||
|
||||
import {Feature} from 'ol';
|
||||
import {Geometry} from 'ol/geom';
|
||||
import {Extent,createEmpty,extend } from 'ol/extent';
|
||||
import {transform} from 'ol/proj';
|
||||
import { tassign } from 'tassign';
|
||||
@@ -46,7 +47,7 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public openedModalName$: Observable<string> = this.store.select(commonReducers.selectOpenedModalName);
|
||||
public itemTypes$: Observable<{ [id: string]: IItemType }>;
|
||||
public mapState$: Observable<IMapState> = this.store.select(mapReducers.selectGetMapState);
|
||||
public features$: Observable<Array<Feature>> = this.store.select(mapReducers.selectGetFeatures);
|
||||
public features$: Observable<Array<Feature<Geometry>>> = this.store.select(mapReducers.selectGetFeatures);
|
||||
public overlayLayers$: Observable<Array<IItemLayer>> = this.store.select(mapReducers.selectGetOverlayLayers);
|
||||
public selectedOverlayLayer$: Observable<IItemLayer> = this.store.select(mapReducers.selectGetSelectedOverlayLayer);
|
||||
public selectedItemLayer$: Observable<IItemLayer> = this.store.select(mapReducers.selectGetSelectedItemLayer);
|
||||
@@ -63,8 +64,8 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
public parentCode$: Observable<string> =this.store.select(mapReducers.selectGetParentCode);
|
||||
public panelVisible$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelVisible);
|
||||
public panelCollapsed$: Observable<boolean> = this.store.select(mapReducers.selectGetPanelCollapsed);
|
||||
public selectedFeature$: Observable<Feature> = this.store.select(mapReducers.selectGetSelectedFeature);
|
||||
public clickedFeature: Subject<Feature> = new Subject<Feature>();
|
||||
public selectedFeature$: Observable<Feature<Geometry>> = this.store.select(mapReducers.selectGetSelectedFeature);
|
||||
public clickedFeature: Subject<Feature<Geometry>> = new Subject<Feature<Geometry>>();
|
||||
public selectedItem$: Observable<IItem> = this.store.select(mapReducers.selectGetSelectedItem);
|
||||
public parentItem$: Observable<IItem> =this.store.select(mapReducers.selectGetParentItem);
|
||||
public queryState$: Observable<IQueryState> = this.store.select(mapReducers.selectGetQueryState);
|
||||
@@ -163,11 +164,11 @@ export class MapComponent implements OnInit, OnDestroy,AfterViewInit {
|
||||
this.uploadService.addFiles(droppedFile.files, droppedFile.event, { parentCode:droppedFile.parentCode, geometry:droppedFile.geometry });
|
||||
}
|
||||
|
||||
handleFeatureClick(feature: Feature) {
|
||||
handleFeatureClick(feature: Feature<Geometry>) {
|
||||
this.clickedFeature.next(feature);
|
||||
}
|
||||
|
||||
handleFeatureHover(feature: Feature) {
|
||||
handleFeatureHover(feature: Feature<Geometry>) {
|
||||
this.store.dispatch(new mapActions.SelectFeature(feature));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user