Fix:map/binfile:add more streets which can be searched for.
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 23 Mar 2011 13:37:21 +0000 (13:37 +0000)
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 23 Mar 2011 13:37:21 +0000 (13:37 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4387 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/item.h
navit/navit/map/binfile/binfile.c

index b17ebf7..89e1c43 100644 (file)
@@ -53,6 +53,9 @@ extern int default_flags[];
 #define item_is_poly_place(item) ((item).type >= type_poly_place1 && (item).type <= type_poly_place6)
 #define item_is_point(item) ((item).type < type_line) 
 #define item_is_custom_poi(item) ((item).type >= type_poi_custom0 && (item).type < type_line)
+#define item_is_street(item) (((item).type >= type_street_0 && (item).type < type_street_1_land) \
+                               ||  (item).type == type_street_pedestrian \
+                               ||  (item).type == type_living_street)
 
 #define item_is_equal_id(a,b) ((a).id_hi == (b).id_hi && (a).id_lo == (b).id_lo)
 #define item_is_equal(a,b) (item_is_equal_id(a,b) && (a).map == (b).map)
index 9facd70..10d2277 100644 (file)
@@ -2067,7 +2067,7 @@ binmap_search_get_item(struct map_search_priv *map_search)
                                        }
                                        continue;
                                }
-                               if ((it->type == type_street_3_city) || (it->type == type_street_2_city) || (it->type == type_street_1_city) || (it->type == type_living_street)) {
+                               if (item_is_street(*it)) {
                                        struct attr at;
                                        if (map_selection_contains_item_rect(map_search->mr->sel, it) && binfile_attr_get(it->priv_data, attr_label, &at)) {
                                                int i,match=0;