Add OsmFeature type

This commit is contained in:
Pieter Vander Vennet 2022-07-13 17:56:10 +02:00
parent 284951f5f7
commit 24f090c92f
7 changed files with 26 additions and 20 deletions

View file

@ -1,9 +1,11 @@
import {Store, UIEventSource} from "../UIEventSource";
import FilteredLayer from "../../Models/FilteredLayer";
import {BBox} from "../BBox";
import {Feature, Geometry} from "@turf/turf";
import {OsmFeature} from "../../Models/OsmFeature";
export default interface FeatureSource {
features: Store<{ feature: any, freshness: Date }[]>;
features: Store<{ feature: OsmFeature, freshness: Date }[]>;
/**
* Mainly used for debuging
*/
@ -28,12 +30,3 @@ export interface FeatureSourceForLayer extends FeatureSource {
export interface IndexedFeatureSource extends FeatureSource {
readonly containedIds: Store<Set<string>>
}
/**
* A feature source which has some extra data about it's state
*/
export interface FeatureSourceState {
readonly sufficientlyZoomed: Store<boolean>;
readonly runningQuery: Store<boolean>;
readonly timeout: Store<number>;
}