forked from MapComplete/MapComplete
Fix: layers now compile again
This commit is contained in:
parent
8f942f0163
commit
1c99173f32
5 changed files with 17 additions and 8 deletions
|
@ -99,8 +99,8 @@ ${Utils.special_visualizations_importRequirementDocs}
|
|||
* Others (e.g.: snapOnto-layers) are not to be handled here
|
||||
* @param argsRaw
|
||||
*/
|
||||
public static getLayerDependencies(argsRaw: string[]) {
|
||||
const args: ImportFlowArguments = <any>Utils.ParseVisArgs(ImportFlowUtils.generalArguments, argsRaw)
|
||||
public static getLayerDependencies(argsRaw: string[], argSpec?) {
|
||||
const args: ImportFlowArguments = <any>Utils.ParseVisArgs(argSpec ?? ImportFlowUtils.generalArguments, argsRaw)
|
||||
return [args.targetLayer]
|
||||
}
|
||||
|
||||
|
@ -108,7 +108,7 @@ ${Utils.special_visualizations_importRequirementDocs}
|
|||
name: string,
|
||||
defaultValue?: string
|
||||
}[], argsRaw: string[]): string[] {
|
||||
const deps = ImportFlowUtils.getLayerDependencies(argsRaw)
|
||||
const deps = ImportFlowUtils.getLayerDependencies(argsRaw, argSpec)
|
||||
const argsParsed: PointImportFlowArguments = <any>Utils.ParseVisArgs(argSpec, argsRaw)
|
||||
const snapOntoLayers = argsParsed.snap_onto_layers?.split(";")?.map(l => l.trim()) ?? []
|
||||
deps.push(...snapOntoLayers)
|
||||
|
|
|
@ -232,7 +232,18 @@
|
|||
"tagRenderings": [
|
||||
{
|
||||
"id": "Import button",
|
||||
"render": "{import_way_button(osm:buildings, building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date, Upload this building to OpenStreetMap)}",
|
||||
"render": {
|
||||
"special": {
|
||||
"type": "import_way_button",
|
||||
"targetLayer": "osm:buildings",
|
||||
"tags": "building=$_bag_obj:building; ref:bag=$_bag_obj:ref:bag; source=BAG; source:date=$_bag_obj:source:date; start_date=$_bag_obj:start_date",
|
||||
"text": {
|
||||
"*": "Upload this building to OpenStreetMap"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"mappings": [
|
||||
{
|
||||
"#": "Something went wrong calculating the tags - don't show an import button",
|
||||
|
|
|
@ -446,7 +446,6 @@
|
|||
"es": "Importar"
|
||||
},
|
||||
"icon": "./assets/svg/addSmall.svg",
|
||||
"location_picker": "photo",
|
||||
"maproulette_id": "mr_taskId"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@
|
|||
"tagRenderings+": [
|
||||
{
|
||||
"id": "import",
|
||||
"render": "{import_button(street_lamps,tags,Import,./assets/svg/addSmall.svg,,,,photo,mr_taskId)}"
|
||||
"render": "{import_button(street_lamps,tags,Import,./assets/svg/addSmall.svg,,,,mr_taskId)}"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
@ -128,8 +128,7 @@
|
|||
"targetLayer": "address",
|
||||
"tags": "urpn_count=$urpn_count;ref:GB:uprn=$ref:GB:uprn$",
|
||||
"text": "Add this address",
|
||||
"icon": "./assets/themes/uk_addresses/housenumber_add.svg",
|
||||
"location_picker": "none"
|
||||
"icon": "./assets/themes/uk_addresses/housenumber_add.svg"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue