Skip to content

Commit 7a5df0b

Browse files
committed
fix(travel-times): Report walk times correctly when the origin is walking distance from the destinat
When the destination is walking distance and walking is the best way to get there, report such.
1 parent 663178e commit 7a5df0b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/get-surface.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ export default function getSurface ({origin, query, stopTreeCache, which}) {
3939
fill(travelTimesForDest, nonTransitTime)
4040
fill(waitTimesForDest, 255)
4141
fill(inVehicleTravelTimesForDest, 255)
42-
fill(walkTimesForDest, 255)
42+
fill(walkTimesForDest, nonTransitTime) // when the origin is within walking distance and
43+
// walking is the fastest way to reach the destination, _everything_ is walk time
4344

4445
for (let stopIdx = 0; stopIdx < nStops; stopIdx++) {
4546
// read the stop ID

0 commit comments

Comments
 (0)