Hello there!
I’m trying to build a simple tool that allows users to get the arrival time for a specific line at a specific stop. What is a little challenging is allowing the user to brows through stop points so they can select the one they are interested in:
The transport hub Hammersmith (id: HUBHMS) has a child, for example, of type NaptanOnstreetBusCoachStopCluster
with id: 490G000567.
This cluster has 3 more children of type NaptanPublicBusCoachTram
(with ids: 490007708V, 490007708X, 490007708XA) which I wanted to allow the user to subscribe to.
Since all three stop points have the same common name (fair enough), I thought the user might be able to select the one stop point he is interested in by displaying the departing lines from that stop point; in other words, out of the context.
My wrong expectation was that one particular line only leaves from one particular stop point in the same family (the same NaptanOnstreetBusCoachStopCluste
in this case).
However, both stop points 490007708V and 490007708X list line 220 as a departing line. There are other overlaps like this as well.
So showing the user two stop points, both with the same common name and the same lines departing from it won’t make much sense to anyone looking at it.
Observing closer, only 490007708V returns arrival times queried in combination with 220. The other stop point 490007708X only returns an empty array. Furthermore, 490007708X also shows some inconsistencies in its anatomy: It’s field indicator
only has a value of “Stop” and the field stopLetter
is not present at all.
My question is if there is anything I should know about the API that helps me solve this problem – allows the user browse a list of stop points that he can subscribe to. Should stop points of type NaptanPublicBusCoachTram
hidden from the user if they are not fully set up with all the usual fields (e.g. indicator
, stopLetter
etc.)? If so what would these field be?
Please let me know if I haven’t been clear/made sense in some part.
Many many thanks for any help in advance, Stephan.