hafas-find-stations

2.1.0 • Public • Published

hafas-find-stations

Given a hafas-client@5 client, find all stations in a bounding box.

npm version build status ISC-licensed minimum Node.js version chat with me on Gitter support me on Patreon

Installation

npm install hafas-find-stations

Usage

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)

Contributing

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.

Package Sidebar

Install

npm i hafas-find-stations

Weekly Downloads

3

Version

2.1.0

License

ISC

Unpacked Size

11.3 kB

Total Files

9

Last publish

Collaborators

  • derhuerst