mapcomplete/UI/Map/ShowDataLayerOptions.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

38 lines
1.1 KiB
TypeScript
Raw Normal View History

import FeatureSource from "../../Logic/FeatureSource/FeatureSource"
import { Store, UIEventSource } from "../../Logic/UIEventSource"
import { ElementStorage } from "../../Logic/ElementStorage"
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
import ScrollableFullScreen from "../Base/ScrollableFullScreen"
import { OsmTags } from "../../Models/OsmFeature"
export interface ShowDataLayerOptions {
/**
* Features to show
*/
features: FeatureSource
/**
* Indication of the current selected element; overrides some filters
*/
selectedElement?: UIEventSource<any>
/**
* What popup to build when a feature is selected
*/
buildPopup?:
| undefined
| ((tags: UIEventSource<any>, layer: LayerConfig) => ScrollableFullScreen)
/**
* If set, zoom to the features when initially loaded and when they are changed
*/
zoomToFeatures?: false | boolean
/**
* Toggles the layer on/off
*/
doShowLayer?: Store<true | boolean>
/**
* Function which fetches the relevant store
*/
2023-03-24 19:21:15 +01:00
fetchStore?: (id: string) => UIEventSource<OsmTags>
}