diff --git a/assets/layers/hospital/hospital.json b/assets/layers/hospital/hospital.json index f36af954ad..da1e400640 100644 --- a/assets/layers/hospital/hospital.json +++ b/assets/layers/hospital/hospital.json @@ -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?
An inpatient is a patient which stays for multiple days in the facility" + }, + "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" @@ -67,4 +87,4 @@ "width": 1 } ] -} \ No newline at end of file +} diff --git a/scripts/generateLayouts.ts b/scripts/generateLayouts.ts index 3d4bf282e1..a456078d33 100644 --- a/scripts/generateLayouts.ts +++ b/scripts/generateLayouts.ts @@ -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 '', `` ) - 0 + try { output = output .replace(