watchPosition

Description

Return the location details (GPS coordinate) of the device if detect changes.

Input / Parameters

Output

Callback

Video

Example

Users want to get the current location of mobile device if the location are changed.

Step

  1. Call the function. timeout: 30000 (connection timeout after 30 seconds) maximumAge: 100 enableHighAccuracy: true

  2. In callback, add a console -> input function to view the result.

Result

User will see the result below in console (the latlng will have different value):

Video

  • N/A

  • N/A

Last updated