[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

AJAX enabled London Underground route finder

ezusbo

6/13/2006 9:56:00 PM

Hi

I have implemented this AJAX enabled route finder for getting from A to
B on the London Underground network, with built in Google Maps for each
station along the way. The AJAX piece allows for auto completion of
station names and performs the search itself. The underlying framework
is Ruby on Rails and scriptaculous.

If you live in London, you might find it useful. Let me know of any
useful feedback.

http://public.ok2life.com/t...

Regards
David
6 Answers

Dave Burt

6/14/2006 7:02:00 AM

0

ezusbo wrote:
> Hi
>
> I have implemented this AJAX enabled route finder for getting from A to
> B on the London Underground network, with built in Google Maps for each
> station along the way. The AJAX piece allows for auto completion of
> station names and performs the search itself. The underlying framework
> is Ruby on Rails and scriptaculous.
>
> If you live in London, you might find it useful. Let me know of any
> useful feedback.
>
> http://public.ok2life.com/t...

I don't live in London, but I do believe I have useful feedback. You
seem to have an action named TubeController#todayshits. (At least,
that's what it would be if you're using standard routes to that URL.)
Let me suggest it may be rather beneficial in this case to use the
underscore_delimited_method_names we tend to use around here. Here's
something like a patch.

- def todayshits
+ def todayshits() redirect_to :action => todays_hits end
+
+ def todays_hits

Cheers,
Dave

Mike Woodhouse

6/14/2006 9:12:00 AM

0


Dave Burt wrote:
> ezusbo wrote:
> > Hi
> >
> > I have implemented this AJAX enabled route finder for getting from A to
> > B on the London Underground network, with built in Google Maps for each
> > station along the way. The AJAX piece allows for auto completion of
> > station names and performs the search itself. The underlying framework
> > is Ruby on Rails and scriptaculous.
> >
> > If you live in London, you might find it useful. Let me know of any
> > useful feedback.
> >
> > http://public.ok2life.com/t...
>
> I don't live in London, but I do believe I have useful feedback. You
> seem to have an action named TubeController#todayshits. (At least,
> that's what it would be if you're using standard routes to that URL.)

And while today hasn't been that great, neither has it been that bad.

I'm not sure about white text on a yellow background (Circle & East
London lines). Otherwise it looks like it could develop into something
quite useful. A facility to exclude lines from the search might be
useful: for at least part of yesterday the Circle, District and parts
of the Metropolitan and Hammersmith & City lines were out of action.

Mike

ezusbo

6/14/2006 3:51:00 PM

0


Mike Woodhouse wrote:
> Dave Burt wrote:
> > ezusbo wrote:
> > > Hi
> > >
> > > I have implemented this AJAX enabled route finder for getting from A to
> > > B on the London Underground network, with built in Google Maps for each
> > > station along the way. The AJAX piece allows for auto completion of
> > > station names and performs the search itself. The underlying framework
> > > is Ruby on Rails and scriptaculous.
> > >
> > > If you live in London, you might find it useful. Let me know of any
> > > useful feedback.
> > >
> > > http://public.ok2life.com/t...
> >
> > I don't live in London, but I do believe I have useful feedback. You
> > seem to have an action named TubeController#todayshits. (At least,
> > that's what it would be if you're using standard routes to that URL.)
>
> And while today hasn't been that great, neither has it been that bad.
>
> I'm not sure about white text on a yellow background (Circle & East
> London lines). Otherwise it looks like it could develop into something
> quite useful. A facility to exclude lines from the search might be
> useful: for at least part of yesterday the Circle, District and parts
> of the Metropolitan and Hammersmith & City lines were out of action.
>
> Mike

Feedbacks gratefully received. I do not have access to the stuff TFL
(http://www.t...) has, like planned closures (like Waterloo and
City line at this moment), rail linkages, maps etc., unless I pay for
them, which is not viable since I am providing this free. I simply
thought this up while using the TFL website, that maybe they should
AJAXify it to something like what I have done here.

A new version will hopefully address the comments you guys give here,
but will take me a bit of time, as this is my nocturnal activity.

Oh and Dave, problem I have with renaming the method now is I have to
change it across the site for each controller I have (and there are
many). Guess I am a bit lazy here, although I will make sure the
methods are more conventionally named from now on.

David

Dave Burt

6/14/2006 5:28:00 PM

0

David Tran wrote:
>> Dave Burt wrote:
>>> I don't live in London, but I do believe I have useful feedback. You
>>> seem to have an action named TubeController#todayshits. (At least,
>>> that's what it would be if you're using standard routes to that URL.)
>> And while today hasn't been that great, neither has it been that bad.
>
> Oh and Dave, problem I have with renaming the method now is I have to
> change it across the site for each controller I have (and there are
> many). Guess I am a bit lazy here, although I will make sure the
> methods are more conventionally named from now on.

Please consider this one especially; there are two obvious ways you can
break "todayshits" into words.

Cheers,
Dave

ezusbo

6/14/2006 7:14:00 PM

0

Dave Burt wrote:
> David Tran wrote:
>
>>>Dave Burt wrote:
>>>
>>>>I don't live in London, but I do believe I have useful feedback. You
>>>>seem to have an action named TubeController#todayshits. (At least,
>>>>that's what it would be if you're using standard routes to that URL.)
>>>
>>>And while today hasn't been that great, neither has it been that bad.
>>
>>Oh and Dave, problem I have with renaming the method now is I have to
>>change it across the site for each controller I have (and there are
>>many). Guess I am a bit lazy here, although I will make sure the
>>methods are more conventionally named from now on.
>
>
> Please consider this one especially; there are two obvious ways you can
> break "todayshits" into words.
>
> Cheers,
> Dave

Completely coincidental, I assure you :-)

David

ezusbo

6/14/2006 10:19:00 PM

0

Mike Woodhouse wrote:
> Dave Burt wrote:
>
>>ezusbo wrote:
>>
>>>Hi
>>>
>>>I have implemented this AJAX enabled route finder for getting from A to
>>>B on the London Underground network, with built in Google Maps for each
>>>station along the way. The AJAX piece allows for auto completion of
>>>station names and performs the search itself. The underlying framework
>>>is Ruby on Rails and scriptaculous.
>>>
>>>If you live in London, you might find it useful. Let me know of any
>>>useful feedback.
>>>
>>>http://public.ok2life.com/t...
>>
>>I don't live in London, but I do believe I have useful feedback. You
>>seem to have an action named TubeController#todayshits. (At least,
>>that's what it would be if you're using standard routes to that URL.)
>
>
> And while today hasn't been that great, neither has it been that bad.
>
> I'm not sure about white text on a yellow background (Circle & East
> London lines). Otherwise it looks like it could develop into something
> quite useful. A facility to exclude lines from the search might be
> useful: for at least part of yesterday the Circle, District and parts
> of the Metropolitan and Hammersmith & City lines were out of action.
>
> Mike
>

Circle Line is black on yellow now, plus some other enhancements.

David