BangleApps/apps/mylocation
Adam Schmalhofer cec31972b5 Merge remote-tracking branch 'upstream/master' into jekyll-apps.json
Ported all of apps.json to metadata.json
2022-01-06 12:47:26 +01:00
..
ChangeLog MyLocation: enhanced icon image, it was a but wishy washy 2021-12-31 23:02:01 +00:00
README.md Update README.md 2021-12-01 10:23:07 +01:00
metadata.json Merge remote-tracking branch 'upstream/master' into jekyll-apps.json 2022-01-06 12:47:26 +01:00
mylocation.app.js Mylocation: make into an app 2021-11-30 23:10:36 +00:00
mylocation.icon.js MyLocation: enhanced icon image, it was a but wishy washy 2021-12-31 23:02:01 +00:00
mylocation.png MyLocation: enhanced icon image, it was a but wishy washy 2021-12-31 23:02:01 +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

README.md

My Location

Sets and stores GPS lat and lon of your preferred city

  • Select one of the preset Cities or setup through the GPS
  • 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