From: Kaj-Michael Lang Date: Thu, 1 Nov 2007 01:46:38 +0000 (+0200) Subject: Use larger area for way search but limit amount of ways returned. Sort by name. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8f8eb87a1f1630a4620a811b1604cf7d7057c765;p=mapper Use larger area for way search but limit amount of ways returned. Sort by name. --- diff --git a/src/osm-db.c b/src/osm-db.c index e0abcfa..5193392 100644 --- a/src/osm-db.c +++ b/src/osm-db.c @@ -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);