Improvements to GRB theme
This commit is contained in:
parent
4525a4de2e
commit
666a3039fe
3 changed files with 49 additions and 9 deletions
|
@ -193,7 +193,7 @@ export default class LayerConfig {
|
||||||
|
|
||||||
|
|
||||||
this.title = tr("title", undefined);
|
this.title = tr("title", undefined);
|
||||||
this.icon = tr("icon", Img.AsData(Svg.pin));
|
this.icon = tr("icon", "");
|
||||||
this.iconOverlays = (json.iconOverlays ?? []).map((overlay, i) => {
|
this.iconOverlays = (json.iconOverlays ?? []).map((overlay, i) => {
|
||||||
let tr = new TagRenderingConfig(overlay.then, self.source.osmTags, `iconoverlays.${i}`);
|
let tr = new TagRenderingConfig(overlay.then, self.source.osmTags, `iconoverlays.${i}`);
|
||||||
if (typeof overlay.then === "string" && SharedTagRenderings.SharedIcons[overlay.then] !== undefined) {
|
if (typeof overlay.then === "string" && SharedTagRenderings.SharedIcons[overlay.then] !== undefined) {
|
||||||
|
@ -415,7 +415,6 @@ export default class LayerConfig {
|
||||||
const label = self.label.GetRenderValue(tgs)?.Subs(tgs)
|
const label = self.label.GetRenderValue(tgs)?.Subs(tgs)
|
||||||
.SetClass("block w-min text-center")
|
.SetClass("block w-min text-center")
|
||||||
.SetStyle("margin-top: "+(iconH + 2) +"px")
|
.SetStyle("margin-top: "+(iconH + 2) +"px")
|
||||||
console.log("Generating label gave ", label, " source: ", self.label, "tags: ", tgs)
|
|
||||||
if (label !== undefined) {
|
if (label !== undefined) {
|
||||||
htmlParts.push(new Combine([label]).SetClass("flex flex-col items-center"))
|
htmlParts.push(new Combine([label]).SetClass("flex flex-col items-center"))
|
||||||
}
|
}
|
||||||
|
|
|
@ -73,9 +73,13 @@ export class Translation extends UIElement {
|
||||||
let rtext: string = "";
|
let rtext: string = "";
|
||||||
if (typeof (el) === "string") {
|
if (typeof (el) === "string") {
|
||||||
rtext = el;
|
rtext = el;
|
||||||
|
} else if(typeof(el) === "number") {
|
||||||
|
// HUH? Where did that number come from?
|
||||||
|
rtext = "" + el;
|
||||||
}else {
|
}else {
|
||||||
Translation.forcedLanguage = lang; // This is a very dirty hack - it'll bite me one day
|
Translation.forcedLanguage = lang; // This is a very dirty hack - it'll bite me one day
|
||||||
rtext = el.InnerRender();
|
rtext = el.InnerRender();
|
||||||
|
|
||||||
}
|
}
|
||||||
for (let i = 0; i < parts.length - 1; i++) {
|
for (let i = 0; i < parts.length - 1; i++) {
|
||||||
combined.push(parts[i]);
|
combined.push(parts[i]);
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"calculatedTags": [
|
||||||
|
"_grbNumber=(feat.properties.fixme?.match(/GRB thinks that this has number ([^;]+)/ ) ?? ['','none']) [1]"
|
||||||
|
],
|
||||||
"title": {
|
"title": {
|
||||||
"render": {
|
"render": {
|
||||||
"nl": "{addr:street} {addr:housenumber}"
|
"nl": "{addr:street} {addr:housenumber}"
|
||||||
|
@ -77,12 +80,40 @@
|
||||||
"then": {
|
"then": {
|
||||||
"nl": "Geen huisnummer"
|
"nl": "Geen huisnummer"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"addr:housenumber:={_grbNumber}",
|
||||||
|
"fixme="
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": "Het huisnummer is <b>{_grbNumber}</b>, wat overeenkomt met het GRB",
|
||||||
|
"hideInAnswer": {
|
||||||
|
"or": [
|
||||||
|
"_grbNumber=",
|
||||||
|
"_grbNumber=none",
|
||||||
|
"_grbNumber=no number"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"if": {
|
||||||
|
"and": [
|
||||||
|
"addr:housenumber:=",
|
||||||
|
"not:addr:housenumber=yes",
|
||||||
|
"fixme="
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"then": "Dit gebouw heeft geen nummer, net zoals in het GRB",
|
||||||
|
"hideInAnswer": "_grbNumber!=no number"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
"question": "Wat is de wooneenheid-aanduiding?",
|
||||||
"render": {
|
"render": {
|
||||||
"nl": "De wooneeinheid-aanduiding is <b>{addr:unit}</b> "
|
"nl": "De wooneenheid-aanduiding is <b>{addr:unit}</b> "
|
||||||
},
|
},
|
||||||
"freeform": {
|
"freeform": {
|
||||||
"key": "addr:unit"
|
"key": "addr:unit"
|
||||||
|
@ -142,8 +173,13 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"hideUnderlayingFeaturesMinPercentage": 0,
|
"hideUnderlayingFeaturesMinPercentage": 0,
|
||||||
"icon": {
|
"label": {
|
||||||
"render": "./assets/svg/bug.svg"
|
"mappings": [
|
||||||
|
{
|
||||||
|
"if": "addr:housenumber~*",
|
||||||
|
"then": "<div style='background-color: white; font: large; width: 1.5em; height: 1.5em; border-radius: 100%'>{addr:housenumber}</div>"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"width": {
|
"width": {
|
||||||
"render": "2"
|
"render": "2"
|
||||||
|
@ -155,6 +191,7 @@
|
||||||
"color": {
|
"color": {
|
||||||
"render": "#00f"
|
"render": "#00f"
|
||||||
},
|
},
|
||||||
|
"wayHandling": 2,
|
||||||
"presets": []
|
"presets": []
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue