Michael Smith
Director of Engineering
NextBus
you would look up the direction using 'tag', and display it using the
given 'name'
-George
> --
> You received this message because you are subscribed to the Google Groups
> "MassDOTDevelopers" group.
> To post to this group, send email to massdotd...@googlegroups.com.
> To unsubscribe from this group, send email to
> massdotdevelop...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/massdotdevelopers?hl=en.
>
>
So does 1 at the end of the dirtag currently mean inbound while 0
means outbound? Do the 4 or 5 numbers before the "v0" mean anything
that might be useful for developers to know?
Thanks so much!
cheers,
jamie
Is there a way to enumerate all of the available directions for a
particular route?
Cheers,
Brendan
On Jun 4, 11:30 am, Michael Smith <msm...@nextbus.com> wrote:
> Configuration data for an agency changes on a regular basis. Therefore
> apps need to be able to handle changes to the configuration data,
> including the dirTags. You should definitely expect the dirTags to
> change again in the future.
Assuming I am using the API correctly, the dirTags do not appear to
match between the routeConfig and vehicleLocation calls:
http://webservices.nextbus.com/service/publicXMLFeed?command=routeConfig&a=mbta&r=1
<direction tag="in" title="Inbound Dudley Station via Mass. Ave."
name="Inbound" useForUI="true">
<direction tag="out" title="Outbound Harvard Station via Mass. Ave."
name="Outbound" useForUI="true">
http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=mbta&r=1&t=0
<vehicle id="2283" routeTag="1" dirTag="1_01_0032v0_0"
lat="42.3483064" lon="-71.0882" secsSinceReport="34"
predictable="true" heading="341" speedKmHr="0.0"/>
<vehicle id="2180" routeTag="1" dirTag="1_01_0029v0_1" lat="42.3748"
lon="-71.1144994" secsSinceReport="34" predictable="true"
heading="191" speedKmHr="0.0"/>
Am I doing something wrong?
It's fair enough that the configuration data for directions can
change, but there is something to be said about making the dirTag a
value that app developers can make reasonable assumptions about. "in"
and "out" were straightforward to map to "Inbound" and "Outbound"
human-readable strings and were consistent across all bus lines and
the T's terminology. These new values require app developers to make
routeConfig calls which (a) increases number of requests and load on
the NextBus servers and (b) makes our apps more complicated, if more
technically "correct".
Thanks,
Joe
Mike
The vehicle locations feed seems to be broken. Where the dirTag attribute appears in the xml, it seems to insert some other xml saying that there's an error
-George
On Jun 7, 2010 8:45 PM, "Michael Smith" <msm...@nextbus.com> wrote:
The issue of the vehicleLocations command providing dirTags that were different from when using the routeConfig command should now be fixed.
Mike
On 6/5/2010 8:58 AM, Joe Shaw wrote:
>
> Hi,
>
> On Jun 4, 11:30 am, Michael Smith<msm...@nextbu...
http://webservices.nextbus.com/service/publicXMLFeed?command=vehicleLocations&a=mbta&t=0
<?xml version="1.0" encoding="utf-8" ?>
<body copyright="All data copyright MBTA 2010.">
<vehicle id="0808" routeTag="null" dirTag="<Error shouldRetry="false">
Exception occurred in XMLFeed,
status=[command=vehicleLocations,agency=mbta] message: null
</Error>
</body>
The XML is corrupted, so reading from it won't work. Is this being looked into?
-George
Mike
>> Now here�s the important part. Right now, in the realtime feed the
>> direction tag is either �in� or �out� and the title attribute is just
>> �Inbound� or �Outbound�. On June 26th (the first day of the MBTA�s
>> Summer schedule) that will change to provide more detailed
>> information, and software should be ready to handle that change. The
>> direction tag will be a unique identifier, �name� will be �Inbound� or
>> �Outbound,� and �title� will roughly correspond to what�s on the
>> destination sign, without the route number. So a route 39 trip might
>> have the direction tag �39_3930037v0_0� which would have the
>> attributes name=�Outbound� and title=�Forest Hills Sta via Huntington
>> Ave.�