forked from MapComplete/MapComplete
Allow a layer to be hidden by default; add some validation and behaviour tweaks
This commit is contained in:
parent
5f3c8dd1b4
commit
ea5bc7cbf4
7 changed files with 17 additions and 2 deletions
|
@ -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"
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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] = "..*"
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue