Fix bugs with themes, add movement of tag renderings in custom theme generator
This commit is contained in:
parent
80f0dbe6e3
commit
b7b1bc13e4
180 changed files with 671 additions and 967 deletions
|
@ -57,7 +57,7 @@ export class FromJSON {
|
|||
const layout = new Layout(
|
||||
json.id,
|
||||
typeof (json.language) === "string" ? [json.language] : json.language,
|
||||
tr(json.title),
|
||||
tr(json.title ?? "Title not defined"),
|
||||
layers,
|
||||
json.startZoom,
|
||||
json.startLat,
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import {LayerDefinition} from "../LayerDefinition";
|
||||
import {And, Or, Tag} from "../../Logic/Tags";
|
||||
import {And, Or, RegexTag, Tag} from "../../Logic/Tags";
|
||||
import {TagRenderingOptions} from "../TagRenderingOptions";
|
||||
import {FromJSON} from "../JSON/FromJSON";
|
||||
|
||||
|
@ -36,10 +36,6 @@ export class Widths extends LayerDefinition {
|
|||
|
||||
private readonly _oneSideParking = new Or([this._leftSideParking, this._rightSideParking]);
|
||||
|
||||
private readonly _carfree = new And(
|
||||
[new Tag("highway", "pedestrian"), new Tag("highway", "living_street"),
|
||||
new Tag("access","destination"), new Tag("motor_vehicle", "destination")])
|
||||
|
||||
private readonly _notCarfree =
|
||||
FromJSON.Tag({"and":[
|
||||
"highway!~pedestrian|living_street",
|
||||
|
@ -130,7 +126,7 @@ export class Widths extends LayerDefinition {
|
|||
}
|
||||
|
||||
this.name = "widths";
|
||||
this.overpassFilter = new Tag("width:carriageway", "*");
|
||||
this.overpassFilter = new RegexTag("width:carriageway", /.*/);
|
||||
|
||||
this.title = new TagRenderingOptions({
|
||||
freeform: {
|
||||
|
@ -140,6 +136,8 @@ export class Widths extends LayerDefinition {
|
|||
}
|
||||
})
|
||||
|
||||
console.log("Not car free: ", this._notCarfree)
|
||||
|
||||
const self = this;
|
||||
this.style = (properties) => {
|
||||
|
||||
|
@ -158,7 +156,7 @@ export class Widths extends LayerDefinition {
|
|||
c = "#f0f"
|
||||
}
|
||||
|
||||
if (this._carfree.matchesProperties(properties)) {
|
||||
if (!this._notCarfree.matchesProperties(properties)) {
|
||||
c = "#aaa";
|
||||
}
|
||||
|
||||
|
@ -196,7 +194,6 @@ export class Widths extends LayerDefinition {
|
|||
txt: "Deze straat heeft dwarsparkeren of diagonaalparkeren aan minstens één zijde. Deze parkeerruimte is niet opgenomen in de straatbreedte."
|
||||
},
|
||||
{k: this._noSideParking, txt: "Auto's mogen hier niet parkeren"},
|
||||
// {k: null, txt: "Nog geen parkeerinformatie bekend"}
|
||||
],
|
||||
freeform: {
|
||||
key: "note:width:carriageway",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue