Merge pull request #11 from danstowell/jsrouting-pulldownchange

refresh search if showing and user changes provider
This commit is contained in:
Richard Fairhurst 2014-03-07 15:58:04 +00:00
commit 565f661f20

View file

@ -254,6 +254,9 @@ OSM.Routing=function(map,name,jqSearch) {
// Choose an engine on dropdown change
r.selectEngine=function(e) {
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
r.chooseEngine=function(name) {