*** translation (including all alerts and presentation)
*** export GPX
*** URL history (or do we consciously not want to support that?)
- *** spinner when waiting for result (beneath 'Go' button?)
-
*** add YOURS engine
*/
r.requestRoute=function(isFinal, updateZoom) {
if (r.route_from && r.route_to) {
+ $(".query_wrapper.routing .spinner").show();
r.awaitingRoute=true;
r.chosenEngine.getRoute(isFinal,[r.route_from,r.route_to]);
if(updateZoom){
// Take directions and write them out
// data = { steps: array of [latlng, sprite number, instruction text, distance in metres] }
// sprite numbers equate to OSRM's route_instructions turn values
- // *** translations?
r.setItinerary=function(data) {
// Create base table
$("#content").removeClass("overlay-sidebar");
$('#sidebar_content').empty();
- var html='<h2><a class="geolink" href="#" onclick="$(~.close_directions~).click();return false;"><span class="icon close"></span></a>' + I18n.t('javascripts.directions.directions') + '</h2>'.replace(/~/g,"'");
- html+="<table id='turnbyturn' />";
+ var html=('<h2><a class="geolink" href="#" onclick="$(~.close_directions~).click();return false;">' +
+ '<span class="icon close"></span></a>' + I18n.t('javascripts.directions.directions') +
+ '</h2><table id="turnbyturn" />').replace(/~/g,"'");
$('#sidebar_content').html(html);
// Add each row
var cumulative=0;
script.src = url+r.name+".gotRoute"+num;
document.body.appendChild(script);
};
- r['gotRoute'+num]=function(data) { r.awaitingRoute=false; list[num].gotRoute(r,data); };
+ r['gotRoute'+num]=function(data) {
+ r.awaitingRoute=false; list[num].gotRoute(r,data);
+ $(".query_wrapper.routing .spinner").hide();
+ };
}
select.append("<option value='"+i+"'>"+I18n.t(list[i].name)+"</option>");
}