]> err.no Git - mapper/commitdiff
Use larger area for way search but limit amount of ways returned. Sort by name.
authorKaj-Michael Lang <milang@tal.org>
Thu, 1 Nov 2007 01:46:38 +0000 (03:46 +0200)
committerKaj-Michael Lang <milang@tal.org>
Thu, 1 Nov 2007 01:46:38 +0000 (03:46 +0200)
src/osm-db.c

index e0abcfae5036e2c6d056c72b1612df2e438b3a89..5193392469fc8eecf5a8f30112b81d49713ba8c2 100644 (file)
@@ -183,7 +183,7 @@ if (sqlite3_prepare_v2(db, "select w.wid,w.name as name,"
                                        " ww.type between $WTS and $WTY and w.wid=ww.wid and n.name like $NAME "
                                        " and ww.lat between $LAT-$RANGE and $LAT+$RANGE "
                                        " and ww.lon between $LON-$RANGE and $LON+$RANGE "
-                                       " order by d",
+                                       " order by name limit 100",
                        -1, &sql.select_way_name_search, NULL)!=SQLITE_OK)
        return FALSE;
 
@@ -933,7 +933,7 @@ GtkTreeIter iter;
 gchar *ltext=NULL;
 guint rows=0;
 gchar tmp1[16], tmp2[16];
-gdouble range=1;
+gdouble range=6;
 
 g_printf("Way Search: [%s] around %.6f %.6f\n", text, lat, lon);