JSONP support for TransitView API

162 views
Skip to first unread message

Kevin DeLoach

unread,
Mar 13, 2017, 9:30:46 PM3/13/17
to SEPTAdev
Most of the endpoints available in the SEPTA API have support for JSONP. I was wondering if JSONP could also be enabled for the TransitView endpoint as well? This would be extremely helpful for client-side applications designed to show real-time bus locations.


Thanks,
Kevin

Greg Apessos

unread,
Mar 14, 2017, 8:36:11 AM3/14/17
to SEPTAdev
Hello,

   I quickly glanced at the code and it seems to have a JSONP callback: http://www3.septa.org/api/TransitView/index.php?route=23&callback=12345.  Is this what you were looking for or did you need something else?

-Greg

Kevin DeLoach

unread,
Mar 14, 2017, 10:35:09 AM3/14/17
to SEPTAdev
Great, I didn't know that option was available! 

Just to note, I tried using the callback argument with URLs from the documentation but it doesn't work. For example:


Also, does the TransitViewAll endpoint also support JSONP? I tried various combinations but couldn't figure it out.

Thanks!

Greg Apessos

unread,
Mar 14, 2017, 1:16:48 PM3/14/17
to SEPTAdev
When using the callback, you'll need to use this syntax: https://www3.septa.org/beta/TransitView/?route=23&callback=test

Also introducing the new and improved TransitViewAll, Now With 100% More JSONP(TM): https://www3.septa.org/api/TransitViewAll/?callback=test

-Greg

Kevin DeLoach

unread,
Mar 14, 2017, 3:09:34 PM3/14/17
to SEPTAdev
Perfect. Thanks!

Kyle Ortiz

unread,
Mar 16, 2017, 12:28:16 PM3/16/17
to sept...@googlegroups.com
Greg, speaking of Transitviewall, may I request the following?

Could you extend the ability so that trolleys are once again trackable on the MSHL [101 and 102] on there? I know two years ago this was adjusted to show shuttle buses which operated on these two routes with different block numbers.

Also can the route 311 be added on there as well?

--
You received this message because you are subscribed to the Google Groups "SEPTAdev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to septadev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Greg Apessos

unread,
Mar 17, 2017, 10:13:41 AM3/17/17
to SEPTAdev
I'll see if we can get this updated today.
To unsubscribe from this group and stop receiving emails from it, send an email to septadev+u...@googlegroups.com.

Kyle Ortiz

unread,
Nov 20, 2017, 10:11:23 AM11/20/17
to sept...@googlegroups.com
Hey, I have notice that an late attribute has appeared on the feed for transitview for "late", Would it be possible for this to be incorporated into the TransitViewAll feed as well?

Greatly appreciated and have a Happy Thanksgiving.

To unsubscribe from this group and stop receiving emails from it, send an email to septadev+unsubscribe@googlegroups.com.

Kyle Ortiz

unread,
Dec 7, 2017, 2:37:25 PM12/7/17
to sept...@googlegroups.com
Good afternoon, just following up to my query.

Apessos, Gregory G

unread,
Dec 8, 2017, 12:06:21 PM12/8/17
to sept...@googlegroups.com
Hello Kyle,

   We are currently testing out an update to TransitViewAll at the moment, which will include the late field.  If testing goes well, I hope to deploy the new code either by the end of the day or tomorrow.  I will let you know once I do.

-Greg


From: sept...@googlegroups.com [sept...@googlegroups.com] on behalf of Kyle Ortiz [van2...@gmail.com]
Sent: Thursday, December 07, 2017 2:37 PM
To: sept...@googlegroups.com
Subject: Re: [SEPTAdev] Re: JSONP support for TransitView API

Kyle Ortiz

unread,
Dec 13, 2017, 6:17:49 PM12/13/17
to sept...@googlegroups.com
Thanks

Kyle Ortiz

unread,
Jan 3, 2018, 1:10:32 PM1/3/18
to sept...@googlegroups.com
Happy new year, any update regarding this?

On Fri, Dec 8, 2017 at 12:06 PM, Apessos, Gregory G <GApe...@septa.org> wrote:

Kyle Ortiz

unread,
Jan 12, 2018, 8:57:33 AM1/12/18
to sept...@googlegroups.com
Good morning, I see that some of the changes were carried through. However it looks like all of the buses which doesn't show a general direction  no longer appears on this feed.  

Greg Apessos

unread,
Jan 12, 2018, 12:56:06 PM1/12/18
to SEPTAdev
Good morning,

   It's been a busy week so I haven't had a chance to reply on the subject.  We did finally push out an update earlier this week but as we dug into the data, things got complicated. 

   When a bus does not show a direction, it means the bus is having trouble communicating with our backend and its current route can not be determined.  The trip_id for this vehicle defaults back to its first trip of the day.  With a few of the vehicles being cross routed, the route it starts on might not be the route it currently is on. 

   Add to this, there are special routes, like the 23 and 45, which internally are considered the same.  For these, it's difficult to determine which part of the route these vehicles are on without a little geospatial fun.  In fact, I don't believe any directionless vehicles would ever appear on these routes from TransitView or TransitViewAll.
  
   That said, some of the missing direction vehicles should start appearing in TransitViewAll soon. The accuracy of the trip (and possibly the route) of these will be in question, though.


   We are also working with our vendor to patch the software running on these buses so they start communicating with our backend correctly again.  When this happens, most of the issues with missing and/or directionless vehicle should be resolved.


   Also, if you only want some routes but not all routes, https://www3.septa.org/api/TransitViewAll/?routes=22,55,77

-Greg

Kyle Ortiz

unread,
Jan 12, 2018, 3:25:07 PM1/12/18
to sept...@googlegroups.com
Greg,  this looks really good,  thanks.

To unsubscribe from this group and stop receiving emails from it, send an email to septadev+unsubscribe@googlegroups.com.

Kyle Ortiz

unread,
Jun 30, 2018, 12:07:57 PM6/30/18
to sept...@googlegroups.com
Any idea when real time data is expected to be added for the subway and NHSL?

Bill O'Brien

unread,
Jun 30, 2018, 4:56:12 PM6/30/18
to sept...@googlegroups.com
We are actively working with the vendor who was awarded the contract to publish gtfs rt for MFL, BSS and NHSl. They are still gathering requirements right now. So we don't have a deadline just yet.

Bill
Reply all
Reply to author
Forward
0 new messages