diff --git a/assets/themes/onwheels/onwheels.json b/assets/themes/onwheels/onwheels.json index ea77a8823d..07cab6fccc 100644 --- a/assets/themes/onwheels/onwheels.json +++ b/assets/themes/onwheels/onwheels.json @@ -130,7 +130,7 @@ "minzoom": 15, "pointRendering": [ { - "marker": [ + "=marker": [ { "icon": "./assets/themes/onwheels/restaurant.svg" } @@ -231,7 +231,7 @@ ], "pointRendering": [ { - "marker": [ + "=marker": [ { "icon": "./assets/themes/onwheels/parking.svg" } @@ -465,7 +465,7 @@ "point", "centroid" ], - "marker": [ + "=marker": [ { "icon": "./assets/svg/statistics.svg" } diff --git a/src/Logic/Osm/Overpass.ts b/src/Logic/Osm/Overpass.ts index 9a4b53edbf..f3e9ce15a7 100644 --- a/src/Logic/Osm/Overpass.ts +++ b/src/Logic/Osm/Overpass.ts @@ -52,7 +52,7 @@ export class Overpass { return `${this._interpreterUrl}?data=${encodeURIComponent(query)}` } - public async ExecuteQuery(query: string): Promise<[FeatureCollection, Date]> { + private async ExecuteQuery(query: string): Promise<[FeatureCollection, Date]> { const json = await Utils.downloadJson(this.buildUrl(query)) if (json.elements.length === 0 && json.remark !== undefined) { diff --git a/src/Models/ThemeConfig/Conversion/PrepareLayer.ts b/src/Models/ThemeConfig/Conversion/PrepareLayer.ts index 16611e0d74..3906f9d7a3 100644 --- a/src/Models/ThemeConfig/Conversion/PrepareLayer.ts +++ b/src/Models/ThemeConfig/Conversion/PrepareLayer.ts @@ -699,7 +699,7 @@ export class RewriteSpecial extends DesugaringStep { ) } - private static escapeStr(v: string): string{ + private static escapeStr(v: string): string { return v .replace(/,/g, "&COMMA") .replace(/\{/g, "&LBRACE") @@ -770,9 +770,7 @@ export class RewriteSpecial extends DesugaringStep { * "special":{ * "type": "multi", * "key": "_nearby_bicycle_parkings:props", - * "tagrendering": { - * "*": "{id} ({distance}m) {tagApply(a,b,c)}" - * } + * "tagrendering": "{id} ({distance}m) {tagApply(a,b,c)}" * }} * const context = ConversionContext.test() * RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,&LBRACEid&RBRACE &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"} @@ -877,7 +875,9 @@ export class RewriteSpecial extends DesugaringStep { } if (foundLanguages.size === 0) { - const args = argNamesList.map((nm) => RewriteSpecial.escapeStr(special[nm] ?? "")).join(",") + const args = argNamesList + .map((nm) => RewriteSpecial.escapeStr(special[nm] ?? "")) + .join(",") return { "*": `{${type}(${args})}`, } diff --git a/src/Utils.ts b/src/Utils.ts index 7185b2ddc5..0ca204a346 100644 --- a/src/Utils.ts +++ b/src/Utils.ts @@ -610,6 +610,11 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be * const target = {"id":"test"} * const result = Utils.Merge(source, target) * result // => {"id":"test","condition":{"and":["xyz"]}} + * + * const source = {"=name": {"en": "XYZ"}} + * const target = {"name":null, "x":"y"} + * const result = Utils.Merge(source, target) + * result // => {"name": {"en": "XYZ"}, "x": "y"} */ static Merge(source: Readonly, target: T): T & S { if (target === null) { @@ -1451,7 +1456,7 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be public static scrollIntoView(element: HTMLBaseElement | HTMLDivElement) { // Is the element completely in the view? const parentRect = Utils.findParentWithScrolling(element)?.getBoundingClientRect() - if(!parentRect){ + if (!parentRect) { return } const elementRect = element.getBoundingClientRect()