latitude
v1.8.1
Published
Get location info (macOS)
Downloads
8
Maintainers
Readme
latitude
Get location info using CoreLocation (macOS)
Install
$ npm install -g latitude
to use it as a CLI tool.
$ npm install --save latitude
to use it in your project
Usage
const latitude = require('latitude');
latitude()
.then(location => {
/*
{latitude: 47.06367550072804,
longitude: 8.28075766132394,
accuracy: 65,
altitude: 447.5973815917969}
*/
})
.catch(err => {
// error description
});
API
latitude()
CLI
$ npm install --global latitude
$ latitude
whereami
This project uses a modified version of https://github.com/robmathers/WhereAmI by Rob Mathers.
The source code is in the /whereami
directory. To build the code and put the executable into bin/whereami
, run npm run build
. You need to have Xcode installed.
License
MIT © Jonny Burger