]> err.no Git - mapper/commitdiff
Use gps position for location only if center mode is other than manual
authorKaj-Michael Lang <milang@angel.tal.org>
Mon, 23 Jul 2007 12:35:43 +0000 (15:35 +0300)
committerKaj-Michael Lang <milang@angel.tal.org>
Mon, 23 Jul 2007 12:35:43 +0000 (15:35 +0300)
src/map.c

index 8badac1f380800d5966a1ab90139b476eab67e7f..c926cd1bbababbeaebcbc1942a0ca134c22a6b74 100644 (file)
--- 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) {