From a0ae8c70cb76d08a363dc5ea345e1a9eef8b9603 Mon Sep 17 00:00:00 2001 From: martin-s Date: Sun, 12 Sep 2010 19:59:48 +0000 Subject: 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 --- navit/map/binfile/binfile.c | 4 ++-- 1 file 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; -- cgit v1.2.1