Phyks (Lucas Verney)
4ff645cc43
Only keep reports which are around the map center in the data returned by the server. Filtering is done client-side for privacy reasons.
8 lines
164 B
JavaScript
8 lines
164 B
JavaScript
export function getLastLocation(state) {
|
|
const { gpx } = state.location;
|
|
if (gpx.length > 0) {
|
|
return gpx[gpx.length - 1];
|
|
}
|
|
return null;
|
|
}
|