mylocation: drop dependency on waypoint

pull/2839/head
Erik Andresen 2023-06-26 13:59:21 +02:00
parent 73042fa58d
commit 712d31669e
3 changed files with 8 additions and 4 deletions

View File

@ -9,7 +9,7 @@ next to it - and you can choose your location on a map.
**On Bangle.js** go to `Settings -> Apps -> My Location` **On Bangle.js** go to `Settings -> Apps -> My Location`
* Select one of the preset Cities, setup through the GPS, waypoints or use the webinterface from the AppLoader * Select one of the preset Cities, setup through the GPS, waypoints (if installed) or use the webinterface from the AppLoader
* Other Apps can read this information to do calculations based on location * Other Apps can read this information to do calculations based on location
* When the City shows ??? it means the location has been set through the GPS * When the City shows ??? it means the location has been set through the GPS

View File

@ -10,7 +10,6 @@
"tags": "tool,utility", "tags": "tool,utility",
"supports": ["BANGLEJS", "BANGLEJS2"], "supports": ["BANGLEJS", "BANGLEJS2"],
"interface": "interface.html", "interface": "interface.html",
"dependencies" : { "waypoints":"type" },
"storage": [ "storage": [
{"name":"mylocation.settings.js","url":"settings.js"} {"name":"mylocation.settings.js","url":"settings.js"}
], ],

View File

@ -93,9 +93,14 @@ function showMainMenu() {
} }
} }
}, },
/*LANG*/'Set From GPS': ()=>{ setFromGPS(); }, /*LANG*/'Set From GPS': ()=>{ setFromGPS(); }
/*LANG*/'Set From Waypoint': ()=>{ setFromWaypoint(); },
}; };
try {
require("waypoints");
mainmenu[/*LANG*/'Set From Waypoint'] = ()=>{ setFromWaypoint(); };
} catch(err) {
// waypoints not installed, thats ok
}
return E.showMenu(mainmenu); return E.showMenu(mainmenu);
} }