Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#2 middle click to recenter map

open
nobody
None
6
2008-09-23
2008-09-23
Hamish B
No

Hi,

I would be nice if a middle click would re-center the map on the map click location.

We would need to do a calculation to adjust the click if it would put the GPS more than 20% close to the edge of the screen and trigger a redraw. Maybe bump that up to 25% in the nearest-in calculation so it doesn't trigger a redraw only a few seconds later.

To figure out: how to place the target in pos mode if the middle button is in use for this and the right click is used to leave pos mode?

Hamish

Discussion

  • Hamish B
    Hamish B
    2008-10-27

    here is a start, but not sure where to put it or go next:

    calcxy (&x, &y, coords.current_lon,
    coords.current_lat, current.zoom);
    calcxytopos (gui_status.mapview_x /2, gui_status.mapview_y /2,
    &coords.current_lat, &coords.current_lon, current.zoom);

    Hamish