refresh search if showing and user changes provider

This commit is contained in:
Dan Stowell 2014-02-23 21:40:21 +00:00
parent f383fe2793
commit deea77ab93

View file

@ -252,6 +252,9 @@ OSM.Routing=function(map,name,jqSearch) {
// Choose an engine on dropdown change // Choose an engine on dropdown change
r.selectEngine=function(e) { r.selectEngine=function(e) {
r.chosenEngine=r.engines[e.target.selectedIndex]; r.chosenEngine=r.engines[e.target.selectedIndex];
if (r.polyline){ // and if a route is currently showing, must also refresh, else confusion
r.requestRoute(true);
}
}; };
// Choose an engine by name // Choose an engine by name
r.chooseEngine=function(name) { r.chooseEngine=function(name) {