cygnal/src/store/getters.js
Phyks (Lucas Verney) 4ff645cc43 Filter reports returned by the API based on map center
Only keep reports which are around the map center in the data returned
by the server. Filtering is done client-side for privacy reasons.
2018-10-15 09:11:41 +02:00

8 lines
164 B
JavaScript

export function getLastLocation(state) {
const { gpx } = state.location;
if (gpx.length > 0) {
return gpx[gpx.length - 1];
}
return null;
}