1
0
Fork 0
BangleApps/apps/mylocation
Gordon Williams f4a48e62e6 Added Util.close to allow interfaces to close the window
Fix My Location that couldn't be installed after the most recent update
2022-11-25 09:42:25 +00:00
..
ChangeLog Added Util.close to allow interfaces to close the window 2022-11-25 09:42:25 +00:00
README.md Added Util.close to allow interfaces to close the window 2022-11-25 09:42:25 +00:00
app.png Mylocation - renamed source files to preferred standard 2022-04-22 21:59:13 +01:00
interface.html Added Util.close to allow interfaces to close the window 2022-11-25 09:42:25 +00:00
metadata.json Added Util.close to allow interfaces to close the window 2022-11-25 09:42:25 +00:00
screenshot_1.png MyLocation - adds menu to set preferred city or setup from GPS 2021-11-26 20:25:28 +00:00
screenshot_2.png MyLocation - adds menu to set preferred city or setup from GPS 2021-11-26 20:25:28 +00:00
screenshot_3.png MyLocation - adds menu to set preferred city or setup from GPS 2021-11-26 20:25:28 +00:00
screenshot_4.png MyLocation - adds menu to set preferred city or setup from GPS 2021-11-26 20:25:28 +00:00
settings.js mylocation 0.07: Move mylocation app into 'Settings -> Apps' 2022-05-26 12:50:44 +01:00

README.md

My Location

Sets and stores GPS lat and lon of your preferred city

To access, you have two options:

In the App Loader once My Location is installed, click on the 'Save' icon 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 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

Example Code

const LOCATION_FILE = "mylocation.json";
let location;

// requires the myLocation app
function loadLocation() {
  location = require("Storage").readJSON(LOCATION_FILE,1)||{"lat":51.5072,"lon":0.1276,"location":"London"};
}

Screenshots

Select one of the Preset Cities

  • The presets are London, Newcastle, Edinburgh, Paris, New York, Tokyo

Or select 'Set By GPS' to start the GPS

While the GPS is running you will see:

When a GPS fix is received you will see:

Written by: Hugh Barney For support and discussion please post in the Bangle JS Forum