Add healthcare tagging to suggestion presets

This commit is contained in:
Bryan Housel
2017-10-07 12:12:56 -04:00
parent ba7e0c39c1
commit bfda2c5438
2 changed files with 204 additions and 0 deletions

View File

@@ -190,6 +190,22 @@ function suggestionsToPresets(presets) {
var tag = category.split('/'),
parent = presets[tag[0] + '/' + tag[1]];
// Hacky code to add healthcare tagging not yet present in name-suggestion-index
// This will be fixed by https://github.com/osmlab/name-suggestion-index/issues/57
if (tag[0] === 'amenity') {
var healthcareTags = {
clinic: 'clinic',
dentist: 'dentist',
doctors: 'doctor',
hospital: 'hospital',
pharmacy: 'pharmacy'
};
if (healthcareTags.hasOwnProperty(tag[1])) {
tags.healthcare = healthcareTags[tag[1]];
}
}
if (!parent) {
console.log('WARN: no preset for suggestion = ' + tag);
return;

File diff suppressed because it is too large Load Diff