Skip to content

Commit

Permalink
Add healthcare tagging to suggestion presets
Browse files Browse the repository at this point in the history
  • Loading branch information
bhousel committed Oct 7, 2017
1 parent ba7e0c3 commit bfda2c5
Show file tree
Hide file tree
Showing 2 changed files with 204 additions and 0 deletions.
16 changes: 16 additions & 0 deletions build_data.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading

0 comments on commit bfda2c5

Please sign in to comment.