mirror of
https://github.com/public-transport/db-vendo-client.git
synced 2025-02-22 22:59:35 +02:00
locationFilter helper
This commit is contained in:
parent
5f4509d89d
commit
c8b2155908
1 changed files with 8 additions and 1 deletions
|
@ -30,10 +30,17 @@ const poi = (latitude, longitude, id, name) => {
|
|||
return {type: 'P', name, lid: 'L=' + id, crd: {x: coord(longitude), y: coord(latitude)}}
|
||||
}
|
||||
|
||||
const locationFilter = (stations, addresses, poi) => {
|
||||
if (stations && addresses && poi) return 'ALL'
|
||||
return (stations ? 'S' : '')
|
||||
+ (addresses ? 'A' : '')
|
||||
+ (poi ? 'P' : '')
|
||||
}
|
||||
|
||||
|
||||
|
||||
module.exports = {
|
||||
date, time,
|
||||
bike, accessibility,
|
||||
coord, station, address, poi
|
||||
coord, station, address, poi, locationFilter
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue