1.0.0 • Published 8 years ago

@yelo/geo-position v1.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

@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/

License

THe MIT License