Phase 4: history view with reverse geocoding
3-section layout (15/70/15) for browsing recorded events. Reverse-geocodes coordinates via Photon API with Haversine distance check and address caching. Also adds simulator GPS polling fallback (Position.getInfo) since the simulator does not fire location event callbacks. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
025d3007db
commit
902121bd42
7 changed files with 368 additions and 11 deletions
29
source/HistoryDelegate.mc
Normal file
29
source/HistoryDelegate.mc
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
import Toybox.Lang;
|
||||
import Toybox.WatchUi;
|
||||
|
||||
// Input handler for HistoryView. UP/DOWN scroll through events,
|
||||
// BACK returns to the menu.
|
||||
class HistoryDelegate extends WatchUi.BehaviorDelegate {
|
||||
|
||||
private var _view as HistoryView;
|
||||
|
||||
function initialize(view as HistoryView) {
|
||||
BehaviorDelegate.initialize();
|
||||
_view = view;
|
||||
}
|
||||
|
||||
function onNextPage() as Boolean {
|
||||
_view.showNext();
|
||||
return true;
|
||||
}
|
||||
|
||||
function onPreviousPage() as Boolean {
|
||||
_view.showPrev();
|
||||
return true;
|
||||
}
|
||||
|
||||
function onBack() as Boolean {
|
||||
WatchUi.popView(WatchUi.SLIDE_RIGHT);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue