From: Kaj-Michael Lang Date: Wed, 8 Aug 2007 08:16:21 +0000 (+0300) Subject: Remove the nearest poi code for location banner. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b60aabb203b42e08392c3ad3b95ccabc364ff5aa;p=mapper Remove the nearest poi code for location banner. --- diff --git a/src/map.c b/src/map.c index 62a4a39..8c6003b 100644 --- a/src/map.c +++ b/src/map.c @@ -1375,24 +1375,20 @@ refresh_mark(); } static void -map_set_place_information(osm_way *s, osm_place *mp, osm_place *sp, PoiInfo *p) +map_set_place_information(osm_way *s, osm_place *mp, osm_place *sp) { gchar buffer[256]; if (!s && !mp && !sp) { - snprintf(buffer, sizeof(buffer), "Location unknown. %s%s", - (p && p->label) ? "Near: " : "", - (p && p->label) ? p->label : ""); + snprintf(buffer, sizeof(buffer), "Unknown location"); } else { /* oh, fun */ - snprintf(buffer, sizeof(buffer), "On %s%s%s%s%s%s%s%s%s%s%s", + snprintf(buffer, sizeof(buffer), "On %s%s%s%s%s%s%s%s%s", s ? s->name ? s->name : _("unknown") : "?", s ? s->ref ? ", " : "" : "", s ? s->ref ? s->ref : "" : "", s ? s->int_ref ? ", " : "" : "", s ? s->int_ref ? s->int_ref : "" : "", - (p && p->label) ? " near " : "", - (p && p->label) ? p->label : "", (sp && sp->name) ? " in " : "", (sp && sp->name) ? sp->name : "", (mp && mp->name) ? " in " : "", @@ -1407,7 +1403,6 @@ map_update_location(gint x, gint y) { gint ilat, ilon; gdouble lat,lon, dist; -PoiInfo *p; gboolean fs; static gboolean inp=FALSE; @@ -1436,11 +1431,6 @@ if (map_loc.street && osm_way_distance(ilat, ilon, map_loc.street->node_f, map_l _map_location_known=map_loc.street ? TRUE : FALSE; _map_location_dist=map_loc.street ? map_loc.street->dist : 900000.0; -#if 0 -p=poi_find_nearest(lat, lon); -#else -p=NULL; -#endif fs=osm_find_nearest_place(NODE_PLACE_SUBURB, ilat, ilon, &map_loc.secondary); if (fs==TRUE && map_loc.secondary && map_loc.secondary->isin!=0) { @@ -1470,7 +1460,7 @@ if (fs==TRUE && map_loc.secondary && map_loc.secondary->isin!=0) { } -map_set_place_information(map_loc.street, map_loc.primary, map_loc.secondary, p); +map_set_place_information(map_loc.street, map_loc.primary, map_loc.secondary); osm_progress_set_widget(_db, NULL); inp=FALSE; }