Fix opening of various views when set by url-parameters, small styling tweaks in the popups

This commit is contained in:
Pieter Vander Vennet 2021-10-23 02:46:37 +02:00
parent d40bf15bc7
commit 933c0f0073
14 changed files with 237 additions and 248 deletions

View file

@ -119,7 +119,7 @@ export default class MapState extends UserRelatedState {
this.overlayToggles = this.layoutToUse.tileLayerSources.filter(c => c.name !== undefined).map(c => ({
config: c,
isDisplayed: QueryParameters.GetQueryParameter("overlay-" + c.id, "" + c.defaultState, "Wether or not the overlay " + c.id + " is shown").map(str => str === "true", [], b => "" + b)
isDisplayed: QueryParameters.GetBooleanQueryParameter("overlay-" + c.id, "" + c.defaultState, "Wether or not the overlay " + c.id + " is shown")
}))
this.filteredLayers = this.InitializeFilteredLayers()
@ -170,17 +170,12 @@ export default class MapState extends UserRelatedState {
.map(value => value === "yes", [], enabled => {
return enabled ? "yes" : "";
})
isDisplayed.addCallbackAndRun(d => console.log("IsDisplayed for layer", layer.id, "is currently", d))
} else {
isDisplayed = QueryParameters.GetQueryParameter(
isDisplayed = QueryParameters.GetBooleanQueryParameter(
"layer-" + layer.id,
"true",
"Wether or not layer " + layer.id + " is shown"
).map<boolean>(
(str) => str !== "false",
[],
(b) => b.toString()
);
)
}
const flayer = {
isDisplayed: isDisplayed,