weexpack plugin add nat-geolocation
- [
callback
] (Function)
result
(Object)latitude
(Float)longitude
(Float)speed
(Float) (m/s)accuracy
(Int) (m)
Nat.geolocation.get((err, ret) => {
console.log(ret)
})
- [
options
] (Object)maximumAge
(Int) (ms)timeout
(Int) (ms)model
(String) (highAccuracy
|lowAccuracy
, default:highAccuracy
)
- [
callback
] (Function)
result
(Object)latitude
(Float)longitude
(Float)speed
(Float) (m/s)accuracy
(Int) (m)
Nat.geolocation.watch((err, ret) => {
console.log(ret)
})
- [
callback
] (Function)
Nat.geolocation.clearWatch(() => {
console.log('cleared')
})
Error LOCATION_INTERNAL_ERROR LOCATION_NOT_SUPPORTED LOCATION_PERMISSION_DENIED LOCATION_SERVICE_BUSY GET_LOCATION_INVALID_ARGUMENT WATCH_LOCATION_INVALID_ARGUMENT LOCATION_UNAVAILABLE LOCATION_TIMEOUT