summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-09-12 19:59:48 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2010-09-12 19:59:48 +0000
commita0ae8c70cb76d08a363dc5ea345e1a9eef8b9603 (patch)
treee737c80daf270dfdd62a6120c5d4687279d09bbc
parentc029d9b251f30f93aa6fa4f25045b4223d7d268a (diff)
downloadnavit-svn-a0ae8c70cb76d08a363dc5ea345e1a9eef8b9603.tar.gz
Fix:map_binfile:Avoid search results from index tile
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@3575 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/map/binfile/binfile.c4
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;