Customisation, activiating the from/to dialogue

89 views
Skip to first unread message

Mark_Lester

unread,
Nov 27, 2013, 3:35:09 AM11/27/13
to opentrippl...@googlegroups.com
I see these guys
http://app.froma2b.co.za/#/
have the from/to dialogue enabled, which for my purposes is essential.
Is there some magic i need in application_context.xml to make this show up ?

Mark_Lester

unread,
Nov 27, 2013, 6:27:48 AM11/27/13
to opentrippl...@googlegroups.com
sorry, everyone has got from/to it seems apart from me, so I think the answer is, go make an up to date build.

FrankP

unread,
Nov 27, 2013, 10:38:28 AM11/27/13
to opentrippl...@googlegroups.com
Just look for a file called config.js in the webapp: https://github.com/opentripplanner/OpenTripPlanner/blob/stable/opentripplanner-webapp/src/main/webapp/js/otp/config.js#L108
(Note, you'd have to make such edits on anything you rebuild).

Mark_Lester

unread,
Nov 27, 2013, 11:53:46 AM11/27/13
to opentrippl...@googlegroups.com
I made a standalone, works great, no osm though which is a pain as I have made a bunch of sttaions and they arent i mapquest yet.
but still no option to type in the source and destinations :(
I found tripoptions-templates.html and TripOptionsWidget.js, but it's not at all obvious why I dont get the "From" and "To" input fileds in the planer.

Mark_Lester

unread,
Nov 27, 2013, 11:55:10 AM11/27/13
to opentrippl...@googlegroups.com
sorry frank just saw, will comply

Mark_Lester

unread,
Nov 28, 2013, 4:39:04 PM11/28/13
to opentrippl...@googlegroups.com
I have a local system working again using stable branch. I have given up on eclipse for now, I couldn't get Tomcat working but I think I screwed up long before that.

I have 3 levels of stuff I'd like to do

1. I have the basic requirement to get the From/To dialogue appearing. I cannot find in any config file or template why this isnt turning up. Do I have to flag something in the data, Graph.obj, that these are station names to be used in a lookup and accept them ?. or is there a flag somewhere ?. It's barely usable now as you have to score a direct hit on the station, and for non locals you just want to type in somewhere like "Sylhet" and let it happen.

The next two are development and I mention them here just FYI as I need to quite a bit of work obviously before I start sticking in requirements. But if there is work going on on either of these please let me know.

2. I then would like to develop the interface so you can get alternative timetable data in a window, stuff like trains from this station, or all trains on this route, or even just the full itinerary of a given train. I've obviously got to get fully conversant with all the  release management and branching etiquette, but my main problem is working out how to get something, anything, to happen.

3. I then have the more major task of allowing someone to click on a given trip and edit it, graphically, by adding/deleting/editing stops and stop_times. i.e. if you want a GTFS editor, then surely this is the most obvious place to have it. I am certain you've already though about that in general. I did fetch all the gtfs editing stuff that seemed freely available. None of it seemed to be more than a few hours work.



Anyway, why is my "From [    ] To [   ]" dialogue missing from the planner dialogue ? (I'd also like OSM back as mapquest dont have any of the edits I did of obscure bangladeshi stations, But I can live without it).







Andrew Byrd

unread,
Nov 28, 2013, 5:03:32 PM11/28/13
to opentrippl...@googlegroups.com
On 11/28/2013 10:39 PM, Mark_Lester wrote:
> 1. I have the basic requirement to get the From/To dialogue appearing. I
> cannot find in any config file or template why this isnt turning up.

It sounds like you want a Geocoder. The OTP API accepts latitude and
longitude coordinates or stop ids as trip endpoints. A geocoder converts
place names into positions that the API understands.

Here is a mailing list post explaining how to set up a geocoder:
https://groups.google.com/d/msg/opentripplanner-dev/81RfyaCpy1A/0RF_iIG8IuUJ

> Do I have to flag something in the data, Graph.obj, that these are station
> names to be used in a lookup and accept them ?

I don't believe the OTP API supports station names as endpoints. It's a
decent idea though, might save some people the trouble of setting up a
geocoder.

> It's barely usable now as you have to score a direct hit on
> the station, and for non locals you just want to type in somewhere like
> "Sylhet" and let it happen.

It sounds like you have not loaded a street network into your graph. OTP
attempts to connect the endpoints to the street network, which then lead
to the transit stations. It is possible to snap the endpoints directly
to a station, but as you've noticed the radius is much smaller. That
radius would need to be much larger to work well with graphs lacking a
street network.

> 2. I then would like to develop the interface so you can get alternative
> timetable data in a window, stuff like trains from this station, or all
> trains on this route, or even just the full itinerary of a given train.

This already exists. You will need to include the TransitIndex when you
build your graph, and you will need to use a client that benefits from
that index. The leaflet client can display routes and next arrivals, etc.

> 3. I then have the more major task of allowing someone to click on a
> given trip and edit it, graphically, by adding/deleting/editing stops
> and stop_times. i.e. if you want a GTFS editor, then surely this is the
> most obvious place to have it. I am certain you've already though about
> that in general. I did fetch all the gtfs editing stuff that seemed
> freely available. None of it seemed to be more than a few hours work.

A graphical GTFS route editor would be nice, and I believe some tools of
this kind already exist, but I'm not sure many people would agree that
the most obvious place for a GTFS editor is embedded in a public-facing
route planner.

I'm fairly sure that the GTFS editors out there, while perhaps not the
most polished software in existence, took significantly more than "a few
hours work" to write.

-Andrew

Mark_Lester

unread,
Nov 28, 2013, 6:20:30 PM11/28/13
to opentrippl...@googlegroups.com
Many thanks Andrew. See here,
http://zee.gr/
"enter location", this time on the right
Mine doesnt have that :(.

I wasnt necessarily suggesting that the users could just change the data themselves ....., well actually i am, but obviously not data that belongs to transit operators etc. But from just a dev point of view, everything I need to be able to go and graphically knock up bus routes in the back of beyond is already there obviously in OTP,
In my case it would obviously be quicker to start from scratch just to get some basic tools going, but long term that's a bit dumb.
Oh and I havent got th gtfs-editor now "owned" by conveyal to work, the instructions are a tad esoteric, but that is an obvious alternative, if I can get to see what it does.

I'll go try and get extra timetable data working.

Mark_Lester

unread,
Nov 28, 2013, 6:33:42 PM11/28/13
to opentrippl...@googlegroups.com
I have to check out for the day, but any pointers on how to run the leaflet client would be gratefully received.
and apologies again to the creators of GTFS-editor.
Reply all
Reply to author
Forward
0 new messages