#define KM10KNOTS (5.39956803)
-void map_render_paths();
-void map_force_redraw();
+void map_render_paths(void);
+void map_force_redraw(void);
void map_draw_position_icon(Position *pos);
static void map_update_location(gdouble lat, gdouble lon, gboolean force);
new_base_tiley + new_y,
new_x * TILE_SIZE_PIXELS,
new_y * TILE_SIZE_PIXELS,
- FALSE);
+ map_drag_id!=0 ? TRUE : FALSE);
}
}
}
{
GdkModifierType state;
gint xx, yy;
-guint unitx, unity;
+guint unitx, unity, nunitx, nunity;
guint cx, cy;
if (!(event->state & GDK_BUTTON1_MASK))
cx = unit2x(_center.unitx);
cy = unit2y(_center.unity);
-map_center_unit(x2unit((gint) (cx - (xx - before[0]))), y2unit((gint) (cy - (yy - before[1]))));
-map_data_needs_refresh=TRUE;
+nunitx=x2unit((gint) (cx - (xx - before[0])));
+nunity=y2unit((gint) (cy - (yy - before[1])));
+
+map_center_unit(nunitx, nunity);
+g_debug("MAP PAN: %d %d %d %d (%d, %d)", cx, cy, xx, yy, nunitx, nunity);
before[0] = xx;
before[1] = yy;
return FALSE;
before[0]=0;
before[1]=0;
map_drag_id=0;
+map_force_redraw();
}
/* Workaround hildon content menu problem */