File tree 2 files changed +3
-3
lines changed
app/assets/javascripts/index
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -73,8 +73,8 @@ OSM.Directions = function (map) {
73
73
74
74
$ ( ".directions_form .btn-close" ) . on ( "click" , function ( e ) {
75
75
e . preventDefault ( ) ;
76
- $ ( ".describe_location" ) . toggle ( ! endpoints [ 0 ] . value ) ;
77
- $ ( ".search_form input[name='query']" ) . val ( endpoints [ 0 ] . value ) ;
76
+ $ ( ".describe_location" ) . toggle ( ! endpoints [ 1 ] . value ) ;
77
+ $ ( ".search_form input[name='query']" ) . val ( endpoints [ 1 ] . value ) ;
78
78
OSM . router . route ( "/" + OSM . formatHash ( map ) ) ;
79
79
} ) ;
80
80
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ OSM.Search = function (map) {
11
11
e . preventDefault ( ) ;
12
12
const query = $ ( this ) . closest ( "form" ) . find ( "input[name=query]" ) . val ( ) ;
13
13
let search = "" ;
14
- if ( query ) search = "?" + new URLSearchParams ( { from : query } ) ;
14
+ if ( query ) search = "?" + new URLSearchParams ( { to : query } ) ;
15
15
OSM . router . route ( "/directions" + search + OSM . formatHash ( map ) ) ;
16
16
} ) ;
17
17
You can’t perform that action at this time.
0 commit comments