added parameter to set meters/miles,

changed toHumanDistance functions so that conditions don't need to be
checked all the time
This commit is contained in:
shiin
2012-05-06 19:10:43 +02:00
parent 7451cc3150
commit 826cbc9a24
4 changed files with 33 additions and 17 deletions
@@ -31,6 +31,7 @@ onClickRouteDescription: function(geometry_index) {
},
onClickCreateShortcut: function(src){
src += '&z='+ OSRM.G.map.getZoom() + '&center=' + OSRM.G.map.getCenter().lat.toFixed(6) + ',' + OSRM.G.map.getCenter().lng.toFixed(6);
src += '&df=' + OSRM.G.DISTANCE_FORMAT;
var source = OSRM.DEFAULTS.SHORTENER_PARAMETERS.replace(/%url/, OSRM.DEFAULTS.HOST_SHORTENER_URL+src);