From f0acd5303c14528517b7b3020bf9d517c8ebc974 Mon Sep 17 00:00:00 2001 From: martin-s Date: Thu, 9 Jun 2011 14:07:20 +0000 Subject: [PATCH] Fix:map_binfile:Made indexed house number searchs work again git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4524 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- navit/navit/map/binfile/binfile.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/navit/navit/map/binfile/binfile.c b/navit/navit/map/binfile/binfile.c index 52bcccf..55dfebf 100644 --- a/navit/navit/map/binfile/binfile.c +++ b/navit/navit/map/binfile/binfile.c @@ -1893,7 +1893,6 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search, struct map_rect_priv *map_rec; struct map_search_priv *msp=g_new0(struct map_search_priv, 1); struct item *town; - struct item *street; msp->search = search; msp->partial = partial; @@ -1950,19 +1949,19 @@ binmap_search_new(struct map_priv *map, struct item *item, struct attr *search, break; if (!map_priv_is(item->map, map)) break; - - map_rec = map_rect_new_binfile(map, NULL); - street = map_rect_get_item_byid_binfile(map_rec, item->id_hi, item->id_lo); - if (street) - { + msp->map=map; + msp->mr_item = map_rect_new_binfile(map, NULL); + msp->item = map_rect_get_item_byid_binfile(msp->mr_item, item->id_hi, item->id_lo); + if (binmap_search_by_index(map, msp->item, &msp->mr) != 3) { struct coord c; - if (item_coord_get(street, &c, 1)) + if (item_coord_get(msp->item, &c, 1)) { msp->mr=binmap_search_housenumber_by_estimate(map, &c, &msp->ms); msp->mode = 2; } + map_rect_destroy_binfile(msp->mr_item); + msp->mr_item=NULL; } - map_rect_destroy_binfile(map_rec); if (!msp->mr) { break; @@ -2117,7 +2116,8 @@ binmap_search_get_item(struct map_search_priv *map_search) return it; } } - } + } else + return it; } continue; default: -- 2.7.4