OSM.RoutingEngines={
- list: []
+ list: [],
+ add: function(supportsHTTPS,engine) {
+ if (document.location.protocol=="http:" || supportsHTTPS) this.list.push(engine);
+ }
};
OSM.Routing=function(map,name,jqSearch) {
$('#turnbyturn').append(row);
cumulative+=step[3];
}
- $('#sidebar_content').append('<p id="routing_credit">' + r.chosenEngine.creditline + '</p>');
+ $('#sidebar_content').append('<p id="routing_credit">' + I18n.t('javascripts.directions.instructions.courtesy',{link: r.chosenEngine.creditline}) + '</p>');
};
r.clickTurn=function(instruction,latlng) {
else { return Math.round(m / 1000) + "km"; }
};
r.formatTime=function(s) {
- var d=new Date(s*1000); var h=d.getHours(); var m=d.getMinutes();
+ var m=Math.round(s/60);
+ var h=Math.floor(m/60);
+ m -= h*60;
return h+":"+(m<10 ? '0' : '')+m;
};