X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/4abb666ef02dcacc590d7b104836c2f512dbed21..098f8e98f2f6dbb5a3906a2355a244cef9d8b812:/app/assets/javascripts/index/query.js diff --git a/app/assets/javascripts/index/query.js b/app/assets/javascripts/index/query.js index 1f45a6872..29916272e 100644 --- a/app/assets/javascripts/index/query.js +++ b/app/assets/javascripts/index/query.js @@ -95,14 +95,20 @@ OSM.Query = function(map) { if (prefixes[key]) { if (prefixes[key][value]) { return prefixes[key][value]; - } else { - var first = value.substr(0, 1).toUpperCase(), - rest = value.substr(1).replace(/_/g, " "); - - return first + rest; } } } + + for (var key in tags) { + var value = tags[key]; + + if (prefixes[key]) { + var first = value.substr(0, 1).toUpperCase(), + rest = value.substr(1).replace(/_/g, " "); + + return first + rest; + } + } } if (!prefix) {