node-ish api for navigator.geolocation in the browser
npm install geolocationgeolocation
``javascript
var geolocation = require('geolocation')
geolocation.getCurrentPosition(function (err, position) {
if (err) throw err
console.log(position)
})
`
$ npm install geolocation
Wraps navigator.geolocation.getCurrentPosition and exposes a node-ish api.
Returns an instance of Watcher
Inherits from EventEmitter`
#### new geolocation.Watcher([options])
#### watcher.start()
Starts watching the current position.
#### watcher.stop()
Stops watching the current position.
#### Event: 'change'
Emitted when the position change.
#### Event: 'error'
Emitted if an error occurs.
MIT