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, |   "minzoom": 12, | ||||||
|   "source": { |   "source": { | ||||||
|     "osmTags": "amenity=hospital" |     "osmTags": {"or": ["amenity=hospital","amenity=clinic"]} | ||||||
|   }, |   }, | ||||||
|   "tagRenderings": [ |   "tagRenderings": [ | ||||||
|     { |     { | ||||||
|  | @ -47,6 +47,26 @@ | ||||||
|         "key": "name" |         "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", |     "phone", | ||||||
|     "email", |     "email", | ||||||
|     "website" |     "website" | ||||||
|  | @ -67,4 +87,4 @@ | ||||||
|       "width": 1 |       "width": 1 | ||||||
|     } |     } | ||||||
|   ] |   ] | ||||||
| } | } | ||||||
|  |  | ||||||
|  | @ -23,8 +23,8 @@ async function createIcon(iconPath: string, size: number, alreadyWritten: string | ||||||
|         name = name.substr(2) |         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) { |     if (alreadyWritten.indexOf(newname) >= 0) { | ||||||
|         return newname |         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
 |         // We already read to file, in order to crash here if the file is not found
 | ||||||
|         let img = await sharp(iconPath) |         let img = await sharp(iconPath) | ||||||
|         let resized = await img.resize(size) |         let resized = await img.resize(size) | ||||||
|         await resized.toFile(newname) |         await resized.toFile(targetpath) | ||||||
|         console.log("Created png version at ", newname) |         console.log("Created png version at ", newname) | ||||||
|     } catch (e) { |     } catch (e) { | ||||||
|         console.error("Could not read icon", iconPath, " to create a PNG due to", 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.ts"></script>', | ||||||
|             `<script type="module"  src='./index_${layout.id}.ts'></script>` |             `<script type="module"  src='./index_${layout.id}.ts'></script>` | ||||||
|         ) |         ) | ||||||
|     0 | 
 | ||||||
|     try { |     try { | ||||||
|         output = output |         output = output | ||||||
|             .replace( |             .replace( | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue