forked from MapComplete/MapComplete
		
	Merge branch 'develop'
This commit is contained in:
		
						commit
						9a45ddb352
					
				
					 2 changed files with 26 additions and 6 deletions
				
			
		|  | @ -24,7 +24,7 @@ | |||
|   }, | ||||
|   "minzoom": 12, | ||||
|   "source": { | ||||
|     "osmTags": "amenity=hospital" | ||||
|     "osmTags": {"or": ["amenity=hospital","amenity=clinic"]} | ||||
|   }, | ||||
|   "tagRenderings": [ | ||||
|     { | ||||
|  | @ -47,6 +47,26 @@ | |||
|         "key": "name" | ||||
|       } | ||||
|     }, | ||||
|     { | ||||
|       "id": "inpatient", | ||||
|       "question": { | ||||
|         "en": "Does this facility admit inpatients?<br><span class='subtle'>An <i>inpatient</i> is a patient which stays for multiple days in the facility</span>" | ||||
|       }, | ||||
|       "mappings": [ | ||||
|         { | ||||
|           "if": "amenity=clinic", | ||||
|           "then": { | ||||
|             "en": "This is a clinic - patients can not stay overnight" | ||||
|           } | ||||
|         }, | ||||
|         { | ||||
|           "if": "amenity=hospital", | ||||
|           "then": { | ||||
|             "en": "This is a hospital - patients can be admitted here for multiple days" | ||||
|           } | ||||
|         } | ||||
|       ] | ||||
|     }, | ||||
|     "phone", | ||||
|     "email", | ||||
|     "website" | ||||
|  |  | |||
|  | @ -23,8 +23,8 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string | |||
|         name = name.substr(2) | ||||
|     } | ||||
| 
 | ||||
|     const newname = `public/assets/generated/images/${name.replace(/\//g, "_")}${size}.png` | ||||
| 
 | ||||
|     const newname = `assets/generated/images/${name.replace(/\//g, "_")}${size}.png` | ||||
|     const targetpath = `public/${newname}` | ||||
|     if (alreadyWritten.indexOf(newname) >= 0) { | ||||
|         return newname | ||||
|     } | ||||
|  | @ -41,7 +41,7 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string | |||
|         // We already read to file, in order to crash here if the file is not found
 | ||||
|         let img = await sharp(iconPath) | ||||
|         let resized = await img.resize(size) | ||||
|         await resized.toFile(newname) | ||||
|         await resized.toFile(targetpath) | ||||
|         console.log("Created png version at ", newname) | ||||
|     } catch (e) { | ||||
|         console.error("Could not read icon", iconPath, " to create a PNG due to", e) | ||||
|  | @ -273,7 +273,7 @@ async function createLandingPage(layout: LayoutConfig, manifest, whiteIcons, alr | |||
|             '<script type="module" src="./index.ts"></script>', | ||||
|             `<script type="module"  src='./index_${layout.id}.ts'></script>` | ||||
|         ) | ||||
|     0 | ||||
| 
 | ||||
|     try { | ||||
|         output = output | ||||
|             .replace( | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue