forked from MapComplete/MapComplete
Refactoring: move all code files into a src directory
This commit is contained in:
parent
de99f56ca8
commit
e75d2789d2
389 changed files with 0 additions and 12 deletions
14
src/Logic/FeatureSource/Sources/SimpleFeatureSource.ts
Normal file
14
src/Logic/FeatureSource/Sources/SimpleFeatureSource.ts
Normal file
|
@ -0,0 +1,14 @@
|
|||
import { UIEventSource } from "../../UIEventSource"
|
||||
import FilteredLayer from "../../../Models/FilteredLayer"
|
||||
import { FeatureSourceForLayer } from "../FeatureSource"
|
||||
import { Feature } from "geojson"
|
||||
|
||||
export default class SimpleFeatureSource implements FeatureSourceForLayer {
|
||||
public readonly features: UIEventSource<Feature[]>
|
||||
public readonly layer: FilteredLayer
|
||||
|
||||
constructor(layer: FilteredLayer, featureSource?: UIEventSource<Feature[]>) {
|
||||
this.layer = layer
|
||||
this.features = featureSource ?? new UIEventSource<Feature[]>([])
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue