From eb9d72ae89a64f2d68d38c9d9264d0008e81e2a4 Mon Sep 17 00:00:00 2001 From: Kaj-Michael Lang Date: Mon, 23 Jul 2007 15:35:43 +0300 Subject: [PATCH] Use gps position for location only if center mode is other than manual --- src/map.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/map.c b/src/map.c index 8badac1..c926cd1 100644 --- a/src/map.c +++ b/src/map.c @@ -971,7 +971,8 @@ void refresh_mark() if (_speed_limit_on) speed_limit(); - map_update_location(_pos.unitx, _pos.unity); + if (_center_mode>0) + map_update_location(_pos.unitx, _pos.unity); vprintf("%s(): return\n", __PRETTY_FUNCTION__); } @@ -1396,14 +1397,9 @@ ilon=lon2mp_int(lon); mplace.name=NULL; splace.name=NULL; -street=osm_find_nearest_way(ilat, ilon); -if (street) - g_printf("WAY: %d %s %s\n", street->id, street->name, street->ref); - p=poi_find_nearest(lat, lon); - -if (osm_find_nearest_place(NODE_PLACE_SUBURB, ilat, ilon, &splace)==TRUE) - g_printf("Near suburb: %s (%d)\n", splace.name, splace.isin); +street=osm_find_nearest_way(ilat, ilon); +osm_find_nearest_place(NODE_PLACE_SUBURB, ilat, ilon, &splace); if (splace.isin!=0) { if (osm_place_get(splace.isin, ilat, ilon, &mplace)==FALSE) { -- 2.39.5