eeui plugin install https://github.com/aipaw/eeui-plugin-geolocation
eeui plugin uninstall https://github.com/aipaw/eeui-plugin-geolocation
const geolocation = app.requireModule("eeui/geolocation");
- [
callback
] (Function)
result
(Object)-
latitude
(Float) -
longitude
(Float) -
speed
(Float) (m/s) -
accuracy
(Int) (m)
-
geolocation.get((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)
-
geolocation.watch((ret) => {
console.log(ret)
})
- [
callback
] (Function)
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