mirror of https://github.com/espruino/BangleApps
mylocation: drop dependency on waypoint
parent
73042fa58d
commit
712d31669e
|
@ -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`
|
||||
|
||||
* 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
|
||||
* When the City shows ??? it means the location has been set through the GPS
|
||||
|
||||
|
|
|
@ -10,7 +10,6 @@
|
|||
"tags": "tool,utility",
|
||||
"supports": ["BANGLEJS", "BANGLEJS2"],
|
||||
"interface": "interface.html",
|
||||
"dependencies" : { "waypoints":"type" },
|
||||
"storage": [
|
||||
{"name":"mylocation.settings.js","url":"settings.js"}
|
||||
],
|
||||
|
|
|
@ -93,9 +93,14 @@ function showMainMenu() {
|
|||
}
|
||||
}
|
||||
},
|
||||
/*LANG*/'Set From GPS': ()=>{ setFromGPS(); },
|
||||
/*LANG*/'Set From Waypoint': ()=>{ setFromWaypoint(); },
|
||||
/*LANG*/'Set From GPS': ()=>{ setFromGPS(); }
|
||||
};
|
||||
try {
|
||||
require("waypoints");
|
||||
mainmenu[/*LANG*/'Set From Waypoint'] = ()=>{ setFromWaypoint(); };
|
||||
} catch(err) {
|
||||
// waypoints not installed, thats ok
|
||||
}
|
||||
return E.showMenu(mainmenu);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue