if (t-tstat.st_mtime>TILE_MAX_AGE) {
if (_auto_download && _curr_repo->type != REPOTYPE_NONE && !((_zoom + zoff - (_curr_repo->double_size ? 1 : 0)) % _curr_repo->dl_zoom_steps)) {
if (download) {
- g_printf("Tile: %s is old, re-downloading\n", buffer);
+ g_debug("Tile: %s is old, re-downloading\n", buffer);
map_initiate_download(tilex >> zoff, tiley >> zoff, _zoom + zoff, -INITIAL_DOWNLOAD_RETRIES);
}
}
}
#ifdef DEBUG_MAP_TIME
g_timer_stop(map_timer);
-g_printf("Full redraw: %f sec\n", g_timer_elapsed(map_timer, &tms));
+g_debug("Full redraw: %f sec\n", g_timer_elapsed(map_timer, &tms));
#endif
map_render_data();
MACRO_QUEUE_DRAW_AREA();
if (z>5) z=5.0; else if (z<1) z=1.0;
iz=(gint)roundf(z);
#ifdef DEBUG
-g_printf("Setting autozoom to: %f %d S:%f\n", z, iz, _gps->data.speed);
+g_debug("Setting autozoom to: %f %d S:%f\n", z, iz, _gps->data.speed);
#endif
if (iz>last)
iz=last+1;
if (dt>0.05) {
dest_reached=FALSE;
}
-#if 0
- g_printf("%f (Prev:%f)\n", prev_dt, dt);
-#endif
+ g_debug("%f (Prev:%f)\n", prev_dt, dt);
} else {
dest_reached=FALSE;
prev_dt=99999.0;
}
+/**
+ * Query the OSM database for where we are.
+ *
+ * XXX: This is the wrong place for this function.
+ */
static void
map_update_location(gdouble lat, gdouble lon, gboolean force)
{
/**
* Mouse scroller zoom in/out callback
*/
-static gboolean
+static gboolean
map_cb_scroll_event(GtkWidget * widget, GdkEventScroll * event)
{
if (event->direction == GDK_SCROLL_UP) {
unit2latlon(ux, uy, lat, lon);
if (map_poi_find_at_latlon(lat, lon, &poi_id)==TRUE) {
- g_printf("POI: %d\n", poi_id);
+ g_debug("POI: %d\n", poi_id);
g_idle_add_full(G_PRIORITY_HIGH_IDLE,(GSourceFunc)map_cb_show_poi_info_dialog, GINT_TO_POINTER(poi_id), NULL);
}
if (map_data_needs_refresh==TRUE) {