diff --git a/apps/mylocation/README.md b/apps/mylocation/README.md index 6e41dd04fd..7fecfdfcb5 100644 --- a/apps/mylocation/README.md +++ b/apps/mylocation/README.md @@ -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 diff --git a/apps/mylocation/metadata.json b/apps/mylocation/metadata.json index 02a6f6f10e..7e0d16d16c 100644 --- a/apps/mylocation/metadata.json +++ b/apps/mylocation/metadata.json @@ -10,7 +10,6 @@ "tags": "tool,utility", "supports": ["BANGLEJS", "BANGLEJS2"], "interface": "interface.html", - "dependencies" : { "waypoints":"type" }, "storage": [ {"name":"mylocation.settings.js","url":"settings.js"} ], diff --git a/apps/mylocation/settings.js b/apps/mylocation/settings.js index 799baacfe1..fcae0389ca 100644 --- a/apps/mylocation/settings.js +++ b/apps/mylocation/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); }