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 |      * Others (e.g.: snapOnto-layers) are not to be handled here | ||||||
|      * @param argsRaw |      * @param argsRaw | ||||||
|      */ |      */ | ||||||
|     public static getLayerDependencies(argsRaw: string[]) { |     public static getLayerDependencies(argsRaw: string[], argSpec?) { | ||||||
|         const args: ImportFlowArguments = <any>Utils.ParseVisArgs(ImportFlowUtils.generalArguments, argsRaw) |         const args: ImportFlowArguments = <any>Utils.ParseVisArgs(argSpec ?? ImportFlowUtils.generalArguments, argsRaw) | ||||||
|         return [args.targetLayer] |         return [args.targetLayer] | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  | @ -108,7 +108,7 @@ ${Utils.special_visualizations_importRequirementDocs} | ||||||
|         name: string, |         name: string, | ||||||
|         defaultValue?: string |         defaultValue?: string | ||||||
|     }[], argsRaw: string[]): string[] { |     }[], argsRaw: string[]): string[] { | ||||||
|         const deps = ImportFlowUtils.getLayerDependencies(argsRaw) |         const deps = ImportFlowUtils.getLayerDependencies(argsRaw, argSpec) | ||||||
|         const argsParsed: PointImportFlowArguments = <any>Utils.ParseVisArgs(argSpec, argsRaw) |         const argsParsed: PointImportFlowArguments = <any>Utils.ParseVisArgs(argSpec, argsRaw) | ||||||
|         const snapOntoLayers = argsParsed.snap_onto_layers?.split(";")?.map(l => l.trim()) ?? [] |         const snapOntoLayers = argsParsed.snap_onto_layers?.split(";")?.map(l => l.trim()) ?? [] | ||||||
|         deps.push(...snapOntoLayers) |         deps.push(...snapOntoLayers) | ||||||
|  |  | ||||||
|  | @ -232,7 +232,18 @@ | ||||||
|       "tagRenderings": [ |       "tagRenderings": [ | ||||||
|         { |         { | ||||||
|           "id": "Import button", |           "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": [ |           "mappings": [ | ||||||
|             { |             { | ||||||
|               "#": "Something went wrong calculating the tags - don't show an import button", |               "#": "Something went wrong calculating the tags - don't show an import button", | ||||||
|  |  | ||||||
|  | @ -446,7 +446,6 @@ | ||||||
|                   "es": "Importar" |                   "es": "Importar" | ||||||
|                 }, |                 }, | ||||||
|                 "icon": "./assets/svg/addSmall.svg", |                 "icon": "./assets/svg/addSmall.svg", | ||||||
|                 "location_picker": "photo", |  | ||||||
|                 "maproulette_id": "mr_taskId" |                 "maproulette_id": "mr_taskId" | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
|  |  | ||||||
|  | @ -61,7 +61,7 @@ | ||||||
|         "tagRenderings+": [ |         "tagRenderings+": [ | ||||||
|           { |           { | ||||||
|             "id": "import", |             "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", |               "targetLayer": "address", | ||||||
|               "tags": "urpn_count=$urpn_count;ref:GB:uprn=$ref:GB:uprn$", |               "tags": "urpn_count=$urpn_count;ref:GB:uprn=$ref:GB:uprn$", | ||||||
|               "text": "Add this address", |               "text": "Add this address", | ||||||
|               "icon": "./assets/themes/uk_addresses/housenumber_add.svg", |               "icon": "./assets/themes/uk_addresses/housenumber_add.svg" | ||||||
|               "location_picker": "none" |  | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|         } |         } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue