From: Kaj-Michael Lang Date: Mon, 23 Jul 2007 12:35:43 +0000 (+0300) Subject: Use gps position for location only if center mode is other than manual X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eb9d72ae89a64f2d68d38c9d9264d0008e81e2a4;p=mapper Use gps position for location only if center mode is other than manual --- 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) {