Merge branch 'develop' into feature/velopark

This commit is contained in:
Pieter Vander Vennet 2024-01-16 04:52:16 +01:00
commit ac12e85760
4 changed files with 15 additions and 10 deletions

View file

@ -130,7 +130,7 @@
"minzoom": 15, "minzoom": 15,
"pointRendering": [ "pointRendering": [
{ {
"marker": [ "=marker": [
{ {
"icon": "./assets/themes/onwheels/restaurant.svg" "icon": "./assets/themes/onwheels/restaurant.svg"
} }
@ -231,7 +231,7 @@
], ],
"pointRendering": [ "pointRendering": [
{ {
"marker": [ "=marker": [
{ {
"icon": "./assets/themes/onwheels/parking.svg" "icon": "./assets/themes/onwheels/parking.svg"
} }
@ -465,7 +465,7 @@
"point", "point",
"centroid" "centroid"
], ],
"marker": [ "=marker": [
{ {
"icon": "./assets/svg/statistics.svg" "icon": "./assets/svg/statistics.svg"
} }

View file

@ -52,7 +52,7 @@ export class Overpass {
return `${this._interpreterUrl}?data=${encodeURIComponent(query)}` 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)) const json = await Utils.downloadJson(this.buildUrl(query))
if (json.elements.length === 0 && json.remark !== undefined) { if (json.elements.length === 0 && json.remark !== undefined) {

View file

@ -770,9 +770,7 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
* "special":{ * "special":{
* "type": "multi", * "type": "multi",
* "key": "_nearby_bicycle_parkings:props", * "key": "_nearby_bicycle_parkings:props",
* "tagrendering": { * "tagrendering": "<b>{id}</b> ({distance}m) {tagApply(a,b,c)}"
* "*": "<b>{id}</b> ({distance}m) {tagApply(a,b,c)}"
* }
* }} * }}
* const context = ConversionContext.test() * const context = ConversionContext.test()
* RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,<b>&LBRACEid&RBRACE</b> &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"} * RewriteSpecial.convertIfNeeded(special, context) // => {"*": "{multi(_nearby_bicycle_parkings:props,<b>&LBRACEid&RBRACE</b> &LPARENS&LBRACEdistance&RBRACEm&RPARENS &LBRACEtagApply&LPARENSa&COMMAb&COMMAc&RPARENS&RBRACE)}"}
@ -877,7 +875,9 @@ export class RewriteSpecial extends DesugaringStep<TagRenderingConfigJson> {
} }
if (foundLanguages.size === 0) { 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 { return {
"*": `{${type}(${args})}`, "*": `{${type}(${args})}`,
} }

View file

@ -610,6 +610,11 @@ In the case that MapComplete is pointed to the testing grounds, the edit will be
* const target = {"id":"test"} * const target = {"id":"test"}
* const result = Utils.Merge(source, target) * const result = Utils.Merge(source, target)
* result // => {"id":"test","condition":{"and":["xyz"]}} * 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<T, S>(source: Readonly<S>, target: T): T & S { static Merge<T, S>(source: Readonly<S>, target: T): T & S {
if (target === null) { if (target === null) {