Don't do the admin boundary special case unless admin_level is set

This commit is contained in:
Tom Hughes 2014-11-07 15:00:22 +00:00
parent e11d734f9f
commit cddec72be5

View file

@ -83,7 +83,7 @@ OSM.Query = function(map) {
var tags = feature.tags;
var prefix = "";
if (tags.boundary === "administrative") {
if (tags.boundary === "administrative" && tags.admin_level) {
prefix = I18n.t("geocoder.search_osm_nominatim.admin_levels.level" + tags.admin_level)
} else {
var prefixes = I18n.t("geocoder.search_osm_nominatim.prefix");