Allow a layer to be hidden by default; add some validation and behaviour tweaks

This commit is contained in:
Pieter Vander Vennet 2021-12-03 02:29:25 +01:00
parent 5f3c8dd1b4
commit ea5bc7cbf4
7 changed files with 17 additions and 2 deletions

View file

@ -301,7 +301,7 @@ export default class MapState extends UserRelatedState {
} else {
isDisplayed = QueryParameters.GetBooleanQueryParameter(
"layer-" + layer.id,
"true",
""+layer.shownByDefault,
"Wether or not layer " + layer.id + " is shown"
)
}

View file

@ -255,6 +255,9 @@ export class TagUtils {
}
if (tag.indexOf("~") >= 0) {
const split = Utils.SplitFirst(tag, "~");
if(split[1] === "") {
throw "Detected a regextag with an empty regex; this is not allowed. Use '"+split[0]+"='instead (at "+context+")"
}
if (split[1] === "*") {
split[1] = "..*"
}