Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
osu-trip
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Michael Vernier
osu-trip
Commits
f247aaf4
Commit
f247aaf4
authored
Apr 08, 2015
by
Michael Vernier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better formatting of object data
parent
d9261dd1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
osu-trip.js
osu-trip.js
+31
-2
No files found.
osu-trip.js
View file @
f247aaf4
...
...
@@ -47,7 +47,13 @@ OSUTrip.getRoutes = function()
throw
bustimeresponse
.
error
;
}
return
bustimeresponse
.
route
;
// return bustimeresponse.route;
var
retval
=
[];
_
.
each
(
bustimeresponse
.
route
,
function
(
route
)
{
retval
.
push
(
{
route
:
route
.
rt
[
0
],
name
:
route
.
rtnm
[
0
],
color
:
route
.
rtclr
[
0
]
}
);
});
return
retval
;
}
else
{
...
...
@@ -206,7 +212,30 @@ OSUTrip.getBuses = function( route )
throw
bustimeresponse
.
error
;
}
return
bustimeresponse
.
vehicle
;
// return bustimeresponse.vehicle;
var
retval
=
[];
_
.
each
(
bustimeresponse
.
vehicle
,
function
(
vehicle
)
{
retval
.
push
(
{
vehicleid
:
vehicle
.
vid
[
0
],
lastupdate
:
moment
(
vehicle
.
tmstmp
[
0
],
'
YYYYMMDD HH:mm:ss
'
).
toDate
(),
lat
:
vehicle
.
lat
[
0
],
lon
:
vehicle
.
lon
[
0
],
heading
:
vehicle
.
hdg
[
0
],
patternid
:
vehicle
.
pid
[
0
],
paterndist
:
vehicle
.
pdist
[
0
],
route
:
vehicle
.
rt
[
0
],
destination
:
vehicle
.
des
[
0
],
// delayed: vehicle.dly[ 0 ],
speed
:
vehicle
.
spd
[
0
],
tablockid
:
vehicle
.
tablockid
[
0
],
tatripid
:
vehicle
.
tatripid
[
0
],
zone
:
vehicle
.
zone
[
0
]
});
});
return
retval
;
}
else
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment