2021-09-21 02:10:42 +02:00
|
|
|
import FeatureSource from "../../Logic/FeatureSource/FeatureSource"
|
2022-06-05 02:24:14 +02:00
|
|
|
import { Store, UIEventSource } from "../../Logic/UIEventSource"
|
2021-10-15 05:20:02 +02:00
|
|
|
import { ElementStorage } from "../../Logic/ElementStorage"
|
2022-01-19 20:34:04 +01:00
|
|
|
import LayerConfig from "../../Models/ThemeConfig/LayerConfig"
|
|
|
|
import ScrollableFullScreen from "../Base/ScrollableFullScreen"
|
2023-03-23 00:58:21 +01:00
|
|
|
import { OsmTags } from "../../Models/OsmFeature"
|
2021-09-21 02:10:42 +02:00
|
|
|
|
|
|
|
export interface ShowDataLayerOptions {
|
2023-03-23 00:58:21 +01:00
|
|
|
/**
|
|
|
|
* Features to show
|
|
|
|
*/
|
2021-09-21 02:10:42 +02:00
|
|
|
features: FeatureSource
|
2023-03-23 00:58:21 +01:00
|
|
|
/**
|
|
|
|
* Indication of the current selected element; overrides some filters
|
|
|
|
*/
|
2021-10-15 05:20:02 +02:00
|
|
|
selectedElement?: UIEventSource<any>
|
2023-03-23 00:58:21 +01:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2021-09-21 02:10:42 +02:00
|
|
|
zoomToFeatures?: false | boolean
|
2023-03-23 00:58:21 +01:00
|
|
|
/**
|
|
|
|
* 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>
|
2021-09-21 02:10:42 +02:00
|
|
|
}
|