added routing_engine and routing_metric to describe the currently chosen

routing
This commit is contained in:
DennisSchiefer
2012-08-14 06:59:42 +01:00
parent de2e070dde
commit 9a6c6cd485
3 changed files with 18 additions and 9 deletions
+3 -2
View File
@@ -31,8 +31,9 @@ OSRM.Routing = {
// init routing data structures
init: function() {
OSRM.G.active_routing_server_id = 0;
OSRM.G.active_routing_server_url = OSRM.DEFAULTS.HOST_ROUTING_URL[ OSRM.G.active_routing_server_id ];
OSRM.G.active_routing_engine = 0;
OSRM.G.active_routing_metric = 0;
OSRM.G.active_routing_server_url = OSRM.DEFAULTS.HOST_ROUTING_URL[ OSRM.G.active_routing_engine ];
OSRM.G.markers = new OSRM.Markers();
OSRM.G.route = new OSRM.Route();
OSRM.G.response = { via_points:[] };
@@ -31,7 +31,8 @@ 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 += '&alt='+OSRM.G.active_alternative;
src += '&df=' + OSRM.G.DISTANCE_FORMAT;
src += '&rs=' + OSRM.G.active_routing_server_id;
src += '&re=' + OSRM.G.active_routing_engine;
src += '&rm=' + OSRM.G.active_routing_metric;
var source = OSRM.DEFAULTS.SHORTENER_PARAMETERS.replace(/%url/, OSRM.DEFAULTS.HOST_SHORTENER_URL+src);