We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9de593e commit 2cf6287Copy full SHA for 2cf6287
js/tracker.js
@@ -2972,7 +2972,14 @@ function update(response) {
2972
for (; i < max ; i++) {
2973
var row = ctx.positions[i];
2974
2975
- if(row.position_id > position_id) { position_id = row.position_id; }
+ // set the position based on the last record (oldest) returned from the server. Only provide minute accuracy to allow better hit rate with cloudfront
2976
+ this_position_id = new Date(row.gps_time);
2977
+ this_position_id.setSeconds(0)
2978
+ this_position_id.setMilliseconds(0)
2979
+
2980
+ if (new Date(position_id) < this_position_id || position_id == 0){
2981
+ position_id = this_position_id.toISOString()
2982
+ }
2983
2984
if (!row.picture) {
2985
addPosition(row);
0 commit comments