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:
|
||||
mapscript,mapdiv = leaflet_chart(rowdata.df[' latitude'],
|
||||
rowdata.df[' longitude'],
|
||||
row.name)
|
||||
if intervaldata:
|
||||
rowdata.df['reltime'] = rowdata.df['TimeStamp (sec)']-rowdata.df.loc[0,'TimeStamp (sec)']
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user