File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -273,9 +273,10 @@ export function planQueryNeeded(
273273 }
274274}
275275
276- function getLocation ( str ) {
276+ function getLocation ( str , planType ) {
277277 const loc = otpToLocation ( str ) ;
278- if ( loc . gtfsId ) {
278+ // direct car routing from/to a stop does not work
279+ if ( loc . gtfsId && planType !== PLANTYPE . CAR ) {
279280 return {
280281 location : {
281282 stopLocation : { stopLocationId : loc . gtfsId } ,
@@ -304,8 +305,8 @@ export function getPlanParams(
304305 planType ,
305306 relaxSettings = false ,
306307) {
307- const fromPlace = getLocation ( from ) ;
308- const toPlace = getLocation ( to ) ;
308+ const fromPlace = getLocation ( from , planType ) ;
309+ const toPlace = getLocation ( to , planType ) ;
309310 const useLatestArrival = arriveBy === 'true' ;
310311 // estimate distance for search iteration heuristics
311312 const fromLocation = otpToLocation ( from ) ;
You can’t perform that action at this time.
0 commit comments