forked from MapComplete/MapComplete
		
	Fix taginfo script, formatting, docs regeneration
This commit is contained in:
		
							parent
							
								
									2f05010648
								
							
						
					
					
						commit
						e3f2c56d3e
					
				
					 5 changed files with 8 additions and 12 deletions
				
			
		|  | @ -15,7 +15,7 @@ export default class AllKnownLayers { | |||
|         const sharedLayers = new Map<string, LayerConfig>(); | ||||
|         for (const layer of known_layers.layers) { | ||||
|             try { | ||||
|                 const parsed = new LayerConfig(layer, AllKnownLayers.sharedUnits,"shared_layers") | ||||
|                 const parsed = new LayerConfig(layer, AllKnownLayers.sharedUnits, "shared_layers") | ||||
|                 sharedLayers.set(layer.id, parsed); | ||||
|                 sharedLayers[layer.id] = parsed; | ||||
|             } catch (e) { | ||||
|  | @ -35,7 +35,7 @@ export default class AllKnownLayers { | |||
|                     continue; | ||||
|                 } | ||||
|                 try { | ||||
|                     const parsed = new LayerConfig(layer, AllKnownLayers.sharedUnits ,"shared_layer_in_theme") | ||||
|                     const parsed = new LayerConfig(layer, AllKnownLayers.sharedUnits, "shared_layer_in_theme") | ||||
|                     sharedLayers.set(layer.id, parsed); | ||||
|                     sharedLayers[layer.id] = parsed; | ||||
|                 } catch (e) { | ||||
|  |  | |||
|  | @ -1,8 +1,7 @@ | |||
| import LayoutConfig from "./JSON/LayoutConfig"; | ||||
| import AllKnownLayers from "./AllKnownLayers"; | ||||
| import * as known_themes from "../assets/generated/known_layers_and_themes.json" | ||||
| import {LayoutConfigJson} from "./JSON/LayoutConfigJson"; | ||||
| import * as all_layouts from "../assets/generated/known_layers_and_themes.json" | ||||
| 
 | ||||
| export class AllKnownLayouts { | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
|  | @ -1,7 +1,6 @@ | |||
| import TagRenderingConfig from "./JSON/TagRenderingConfig"; | ||||
| import * as questions from "../assets/tagRenderings/questions.json"; | ||||
| import * as icons from "../assets/tagRenderings/icons.json"; | ||||
| import {Utils} from "../Utils"; | ||||
| 
 | ||||
| export default class SharedTagRenderings { | ||||
| 
 | ||||
|  | @ -12,9 +11,6 @@ export default class SharedTagRenderings { | |||
|         const dict = new Map<string, TagRenderingConfig>(); | ||||
| 
 | ||||
|         function add(key, store) { | ||||
|             if(Utils.runningFromConsole){ | ||||
|                 return; | ||||
|             } | ||||
|             try { | ||||
|                 dict.set(key, new TagRenderingConfig(store[key], undefined, `SharedTagRenderings.${key}`)) | ||||
|             } catch (e) { | ||||
|  |  | |||
|  | @ -42,7 +42,7 @@ image-key | image | Image tag to add the URL to (or image-tag:0, image-tag:1 whe | |||
| 
 | ||||
| name | default | description | ||||
| ------ | --------- | ------------- | ||||
| zoomlevel | 18 | The zoomlevel: the higher, the more zoomed in with 1 being the entire world and 19 being really close | ||||
| zoomlevel | 18 | The (maximum) zoomlevel: the target zoomlevel after fitting the entire feature. The minimap will fit the entire feature, then zoom out to this zoom level. The higher, the more zoomed in with 1 being the entire world and 19 being really close | ||||
| idKey | id | (Matches all resting arguments) This argument should be the key of a property of the feature. The corresponding value is interpreted as either the id or the a list of ID's. The features with these ID's will be shown on this minimap. | ||||
|   | ||||
| #### Example usage  | ||||
|  |  | |||
|  | @ -47,8 +47,9 @@ function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any [] { | |||
| 
 | ||||
|     for (const tr of layer.tagRenderings) { | ||||
|         { | ||||
|             const usesImageCarousel = (tr.render?.txt?.indexOf("image_carousel()") ?? -2) > 0 | ||||
|             const usesImageUpload = (tr.render?.txt?.indexOf("image_upload()") ?? -2) > 0 | ||||
|             const usesImageCarousel = (tr.render?.txt?.indexOf("image_carousel") ?? -2) > 0 | ||||
|             const usesImageUpload = (tr.render?.txt?.indexOf("image_upload") ?? -2) > 0 | ||||
| 
 | ||||
|             if (usesImageCarousel || usesImageUpload) { | ||||
| 
 | ||||
|                 const descrNoUpload = `The layer '${layer.name.txt} shows images based on the keys image, image:0, image:1,... and  wikidata, wikipedia, wikimedia_commons and mapillary`; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue