Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/imyelo/geo-position

get coords of geo-position from browser, compatible with QQ-Browser (mobile)
https://github.com/imyelo/geo-position

coords geo-position geolocation qq-browser

Last synced: about 2 months ago
JSON representation

get coords of geo-position from browser, compatible with QQ-Browser (mobile)

Awesome Lists containing this project

README

        

# @yelo/geo-position
> get coords of geo-position from browser, compatible with QQ-Browser (mobile)

## Install
```
npm i --save @yelo/geo-position
```

## Usage
```
var position = require('@yelo/geo-position');

position().then(function (coords) {
console.log(coords);
}, function (err) {
console.error(err);
});
```

## API
### position([options])
get coords of geo-position, will return a Promise
```
position({
maximumAge: 10 * 60 * 1000,
timeout: 30 * 1000
}).then(function (coords) {
console.log(coords);
}, function (err) {
console.error(err);
}));
```

## Example
[https://imyelo.github.io/geo-position/](https://imyelo.github.io/geo-position/)

## License
THe MIT License