# geolocation **Repository Path**: mirrors_tellnes/geolocation ## Basic Information - **Project Name**: geolocation - **Description**: node-ish api for navigator.geolocation in the browser - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-08-18 - **Last Updated**: 2026-01-09 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # geolocation geolocation [![Dependency Status](https://gemnasium.com/tellnes/geolocation.png)](https://gemnasium.com/tellnes/geolocation) ## Usage ```javascript var geolocation = require('geolocation') geolocation.getCurrentPosition(function (err, position) { if (err) throw err console.log(position) }) ``` ## Install $ npm install geolocation ## API ### geolocation.getCurrentPosition([options], callback) Wraps `navigator.geolocation.getCurrentPosition` and exposes a node-ish api. ### geolocation.createWatcher([options], [changeListener]) Returns an instance of `Watcher` ### Class: geolocation.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. ## License MIT