10-14-2017 19:51 - edited 10-14-2017 19:52
10-14-2017 19:51 - edited 10-14-2017 19:52
The guide advises that the geolocation.watchPosition's callback "is called each time the location changes."
In a continuously moving environment (e.g. a racing yacht) the location is changing continuously, which casts doubt on that. My questions are:
10-15-2017 19:49
10-15-2017 19:49
Interested in answers as well, and in the same context of the moving yacht.
10-20-2017 12:44
10-20-2017 12:44
Can a developer please do some simple tests to answer some of this question?
10-21-2017 15:37
10-21-2017 15:37
I am interested in hearing more as well. I could not get watchposition to work, based on the example in the guide. Geolocation works, but watchposition does not export data. If someone is looking into this, can you let me know if I should change something from the example?
10-21-2017 18:21 - edited 10-21-2017 18:22
10-21-2017 18:21 - edited 10-21-2017 18:22
@agsurf5 wrote:I am interested in hearing more as well. I could not get watchposition to work,
So what did you get? Could you post your code and its results?
10-22-2017 04:22
10-22-2017 04:22
I used the code from the guide:
https://dev.fitbit.com/guides/geolocation/#monitoring-the-current-location
Can an get the coordinates for getCurrentPosition, but not for watchPosition
10-22-2017 04:29 - edited 10-22-2017 04:53
10-22-2017 04:29 - edited 10-22-2017 04:53
do you get anything from your loctionSuccess function?
function locationSuccess(position) { console.log("Latitude: " + position.coords.latitude, "Longitude: " + position.coords.longitude); }
Reading the Guide it seems you should only get a response "...each time the location changes." Which contradicts the Reference on watchPosition() :"Request that the system monitor the position continuously and report position updates as available"
I wonder what is really going on?
10-22-2017 07:36
10-22-2017 07:36
WatchPosition is blank for me. Neither location nor error
10-23-2017 16:28
10-23-2017 16:28
There is definitely a bug with watchPosition(), I've escalated this with the firmware team.
The API is designed in partity with:
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation
10-23-2017 16:53 - edited 10-23-2017 16:54
10-23-2017 16:53 - edited 10-23-2017 16:54
@JonFitbit wrote:
- Is the callback actually called every second, on the second?
This depends upon how you configure the options. See below.
I didn't see any ref to configure the options.
And what is the nature of the bug you have escalated?
10-24-2017 05:47
10-24-2017 05:47
@raceQs wrote:
@JonFitbit wrote:
- Is the callback actually called every second, on the second?
This depends upon how you configure the options. See below.I didn't see any ref to configure the options.
And what is the nature of the bug you have escalated?
The options were on the link, sorry https://developer.mozilla.org/en-US/docs/Web/API/PositionOptions
The bug is that watchPosition() doesn't seem to be working.