watchPosition
Last updated
Last updated
Return the location details (GPS coordinate) of the device if detect changes.
No | Name | Description | Data Type | Required | Example |
---|---|---|---|---|---|
Users want to get the current location of mobile device if the location are changed.
Call the function. timeout: 30000 (connection timeout after 30 seconds) maximumAge: 100 enableHighAccuracy: true
In callback, add a console -> input function to view the result.
User will see the result below in console (the latlng will have different value):
N/A
N/A
1
timeout
Connection time out period in millisecond
Integer
Yes
1000, 2000, ...
2
maximumAge
maximumAge period in millisecond
Integer
No
100
3
enableHighAccuracy
Enable High Accuracy
Boolean
No
4
enableHighAccuracy
Enable High Accuracy
Boolean
No