chrisg220 / bus-trip-planner

2 stars 0 forks source link

Feature Request: add trips #1

Open cameronbot opened 11 years ago

cameronbot commented 11 years ago

Creating a trip process should roughly follow this: User:

   - visit '/'
   - user clicks "Create Trip"
   - fill in "Title"
   - fill in "Start Address"
   - fill in "End Address"
   - check "Leave By" or "Arrive By"
   - fill in "Time"
   - click "Submit" (ajax?)

Controller:

   - url:  "http://maps.googleapis.com/maps/api/directions/json?"
         + "origin=start_address&"
         + "destination=end_address&"
         + "sensor=false&"
         + "mode=transit&"
         + "alternatives=true&" # this flag sets if google responds w/ multiple route options
         + "departure_time=time" OR "arrival_time=time" # depending on selected option
   - check if url.length is less than 2048 # google api limitation
   - open url & get response (response will be multiple route options)
   - render responses in view with 'checkbox' next to each route option
   - if route option has no transfers, do we disable it since its irrelevant to our app?

User:

   - select which routes to monitor
   - click "Submit"

Controller:

   - store routes/legs
cameronbot commented 11 years ago

Here is a url for an example response showing directions from TechStars to Northgate Mall:

http://maps.googleapis.com/maps/api/directions/json?origin=511%20North%20Boren%20Ave&destination=Northgate%20Mall,Seattle&sensor=false&mode=transit&alternatives=true&departure_time=1344905500

zaithottakath commented 11 years ago

check check check it http://rubygems.org/gems/json_select

On Tue, Mar 12, 2013 at 1:20 PM, Cameron Hill notifications@github.comwrote:

Here is a url for an example response showing directions from TechStars to Northgate Mall:

http://maps.googleapis.com/maps/api/directions/json?origin=511%20North%20Boren%20Ave&destination=Northgate%20Mall,Seattle&sensor=false&mode=transit&alternatives=true&departure_time=1344905500

— Reply to this email directly or view it on GitHubhttps://github.com/chrisg220/bus-trip-planner/issues/1#issuecomment-14800402 .