API - add coordinates in chart_data - #4
This commit is contained in:
parent
d61b022035
commit
f252620ac1
@ -908,6 +908,8 @@
|
||||
<span class="nt">"distance"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="nt">"duration"</span><span class="p">:</span> <span class="mi">0</span><span class="p">,</span>
|
||||
<span class="nt">"elevation"</span><span class="p">:</span> <span class="mf">279.4</span><span class="p">,</span>
|
||||
<span class="nt">"latitude"</span><span class="p">:</span> <span class="mf">51.5078118</span><span class="p">,</span>
|
||||
<span class="nt">"longitude"</span><span class="p">:</span> <span class="mf">-0.1232004</span><span class="p">,</span>
|
||||
<span class="nt">"speed"</span><span class="p">:</span> <span class="mf">8.63</span><span class="p">,</span>
|
||||
<span class="nt">"time"</span><span class="p">:</span> <span class="s2">"Fri, 14 Jul 2017 13:44:03 GMT"</span>
|
||||
<span class="p">},</span>
|
||||
@ -915,6 +917,8 @@
|
||||
<span class="nt">"distance"</span><span class="p">:</span> <span class="mf">7.5</span><span class="p">,</span>
|
||||
<span class="nt">"duration"</span><span class="p">:</span> <span class="mi">7380</span><span class="p">,</span>
|
||||
<span class="nt">"elevation"</span><span class="p">:</span> <span class="mi">280</span><span class="p">,</span>
|
||||
<span class="nt">"latitude"</span><span class="p">:</span> <span class="mf">51.5079733</span><span class="p">,</span>
|
||||
<span class="nt">"longitude"</span><span class="p">:</span> <span class="mf">-0.1234538</span><span class="p">,</span>
|
||||
<span class="nt">"speed"</span><span class="p">:</span> <span class="mf">6.39</span><span class="p">,</span>
|
||||
<span class="nt">"time"</span><span class="p">:</span> <span class="s2">"Fri, 14 Jul 2017 15:47:03 GMT"</span>
|
||||
<span class="p">}</span>
|
||||
|
File diff suppressed because one or more lines are too long
@ -469,6 +469,8 @@ def get_activity_chart_data(auth_user_id, activity_id):
|
||||
"distance": 0,
|
||||
"duration": 0,
|
||||
"elevation": 279.4,
|
||||
"latitude": 51.5078118,
|
||||
"longitude": -0.1232004,
|
||||
"speed": 8.63,
|
||||
"time": "Fri, 14 Jul 2017 13:44:03 GMT"
|
||||
},
|
||||
@ -476,6 +478,8 @@ def get_activity_chart_data(auth_user_id, activity_id):
|
||||
"distance": 7.5,
|
||||
"duration": 7380,
|
||||
"elevation": 280,
|
||||
"latitude": 51.5079733,
|
||||
"longitude": -0.1234538,
|
||||
"speed": 6.39,
|
||||
"time": "Fri, 14 Jul 2017 15:47:03 GMT"
|
||||
}
|
||||
|
@ -315,6 +315,8 @@ def get_chart_data(gpx_file):
|
||||
'duration': point.time_difference(first_point),
|
||||
'elevation': (round(point.elevation, 1)
|
||||
if point.elevation is not None else 0),
|
||||
'latitude': point.latitude,
|
||||
'longitude': point.longitude,
|
||||
'speed': speed,
|
||||
'time': point.time,
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user