Given a hafas-client@5
client, find all stations in a bounding box.
npm install hafas-find-stations
const createHafas = require('hafas-client')
const vbbProfile = require('hafas-client/p/vbb')
const findStations = require('hafas-find-stations')
const bbox = {
north: 52.53,
west: 13.36,
south: 52.51,
east: 13.41
}
const hafas = createHafas(vbbProfile, 'hafas-find-stations example')
findStations(hafas, bbox, {concurrency: 1}, (err, station) => {
if (err) console.error(err)
if (station) console.log(station.id + '\t' + station.name)
})
.catch(console.error)
If you have a question or need support using hafas-find-stations
, please double-check your code and setup first. If you think you have found a bug or want to propose a feature, refer to the issues page.