Merge develop

This commit is contained in:
Pieter Vander Vennet 2021-10-26 01:27:35 +02:00
commit 07bc5d6a6d
88 changed files with 3284 additions and 2363 deletions

View file

@ -144,31 +144,20 @@ export default class FeatureSwitchState {
}
this.featureSwitchIsTesting = QueryParameters.GetQueryParameter(
this.featureSwitchIsTesting = QueryParameters.GetBooleanQueryParameter(
"test",
""+testingDefaultValue,
"If true, 'dryrun' mode is activated. The app will behave as normal, except that changes to OSM will be printed onto the console instead of actually uploaded to osm.org"
).map(
(str) => str === "true",
[],
(b) => "" + b
);
)
this.featureSwitchIsDebugging = QueryParameters.GetQueryParameter(
this.featureSwitchIsDebugging = QueryParameters.GetBooleanQueryParameter(
"debug",
"false",
"If true, shows some extra debugging help such as all the available tags on every object"
).map(
(str) => str === "true",
[],
(b) => "" + b
);
)
this.featureSwitchFakeUser = QueryParameters.GetQueryParameter("fake-user", "false",
this.featureSwitchFakeUser = QueryParameters.GetBooleanQueryParameter("fake-user", "false",
"If true, 'dryrun' mode is activated and a fake user account is loaded")
.map(str => str === "true", [], b => "" + b);
this.overpassUrl = QueryParameters.GetQueryParameter("overpassUrl",

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,