Use unobtrusive JS for routing related events

This commit is contained in:
John Firebaugh 2014-05-12 12:47:36 -07:00
parent be79156f43
commit 18c7c4f5d7
2 changed files with 15 additions and 3 deletions

View file

@ -352,5 +352,17 @@ OSM.Directions = function (map, name, jqSearch) {
}
};
$("input[name='route_from']").on("change", function (e) {
r.geocode('route_from', e);
});
$("input[name='route_to']").on("change", function (e) {
r.geocode('route_to', e);
});
$("select[name='routing_engines']").on("change", function (e) {
r.selectEngine(e);
});
return r;
};