map showing only the interval of interest
This commit is contained in:
@@ -2411,9 +2411,15 @@ def workout_view(request,id=0,raceresult=0,sessionresult=0):
|
|||||||
|
|
||||||
|
|
||||||
if hascoordinates:
|
if hascoordinates:
|
||||||
mapscript,mapdiv = leaflet_chart(rowdata.df[' latitude'],
|
if intervaldata:
|
||||||
rowdata.df[' longitude'],
|
rowdata.df['reltime'] = rowdata.df['TimeStamp (sec)']-rowdata.df.loc[0,'TimeStamp (sec)']
|
||||||
row.name)
|
mask = (rowdata.df['reltime']>startsecond) & (rowdata.df['reltime']<endsecond)
|
||||||
|
latitudes = rowdata.df.loc[mask,' latitude']
|
||||||
|
longitudes = rowdata.df.loc[mask,' longitude']
|
||||||
|
else:
|
||||||
|
latitudes = rowdata.df[' latitude']
|
||||||
|
longitudes = rowdata.df[' longitude']
|
||||||
|
mapscript,mapdiv = leaflet_chart(latitudes,longitudes,row.name,)
|
||||||
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
|
|||||||
Reference in New Issue
Block a user