amtrak
amtrak copied to clipboard
Question: Fetch trains within X miles of city
Hi, is it possible to fetch all trains within a specific miles of a city?
Currently no, but that shouldn't be too hard to implement. I could jot it down to implement in my rewrite.
Also in an upcoming update, you'll be able to get the coordinates of each station and use that data to achieve this.
Also in an upcoming update, you'll be able to get the coordinates of each station and use that data to achieve this.
Thing is I'm trying to get all trains within x miles of a city, not just the ones stopping at that city/station.
not just the ones stopping at that city/station.
I am aware. The function returning station information will also have the coordinates of that station, so you could use some math to figure out which trains are in x miles of said station, regardless of if they're stopping there.