diff options
-rw-r--r-- | navit/map/binfile/binfile.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/navit/map/binfile/binfile.c b/navit/map/binfile/binfile.c index 2de8d1d9..0953fcd0 100644 --- a/navit/map/binfile/binfile.c +++ b/navit/map/binfile/binfile.c @@ -1437,13 +1437,13 @@ binmap_search_get_item(struct map_search_priv *map_search) case attr_town_name: case attr_district_name: case attr_town_or_district_name: - if (item_is_town(*it) && !item_is_district(*it) && map_search->search->type != attr_district_name) { + if (map_search->mr->tile_depth > 1 && item_is_town(*it) && !item_is_district(*it) && map_search->search->type != attr_district_name) { if (binfile_attr_get(it->priv_data, attr_town_name_match, &at) || binfile_attr_get(it->priv_data, attr_town_name, &at)) { if (!ascii_cmp(at.u.str, map_search->search->u.str, map_search->partial) && !duplicate(map_search, it, attr_town_name)) return it; } } - if (item_is_district(*it) && map_search->search->type != attr_town_name) { + if (map_search->mr->tile_depth > 1 && item_is_district(*it) && map_search->search->type != attr_town_name) { if (binfile_attr_get(it->priv_data, attr_district_name_match, &at) || binfile_attr_get(it->priv_data, attr_district_name, &at)) { if (!ascii_cmp(at.u.str, map_search->search->u.str, map_search->partial) && !duplicate(map_search, it, attr_town_name)) return it; |