Fix:map/binfile:Workaround for finding streets with labels but no name (i.e. pedestrian)
authorrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 23 Mar 2011 20:25:11 +0000 (20:25 +0000)
committerrikky <rikky@ffa7fe5e-494d-0410-b361-a75ebd5db220>
Wed, 23 Mar 2011 20:25:11 +0000 (20:25 +0000)
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@4388 ffa7fe5e-494d-0410-b361-a75ebd5db220

navit/navit/map/binfile/binfile.c

index 10d2277..3c2e70e 100644 (file)
@@ -2073,6 +2073,13 @@ binmap_search_get_item(struct map_search_priv *map_search)
                                                int i,match=0;
                                                char *str=g_strdup(at.u.str);
                                                char *word=str;
+                                               struct attr at_streetname;
+                                               if (!binfile_attr_get(it->priv_data, attr_street_name, &at_streetname))
+                                               {
+                                                       at_streetname.type = attr_street_name;
+                                                       at_streetname.u.str = g_strdup(at.u.str);
+                                                       binfile_attr_set(it->priv_data, &at_streetname, change_mode_modify);
+                                               }
                                                do {
                                                        for (i = 0 ; i < 3 ; i++) {
                                                                char *name=linguistics_expand_special(word,i);