added switching between search engines
- works with different languages - works with links refactored selector code: - changed method names - changed method parameters (object -> id), - added method to rename all options of dropdown menu refactored distance format selector code: - changed method names - changed variable names - changed how to init/select element/change language of dropdown menu refactored maintenance notification overrides: - changed names of default variables
This commit is contained in:
@@ -31,9 +31,9 @@ OSRM.Routing = {
|
||||
|
||||
// init routing data structures
|
||||
init: function() {
|
||||
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 ];
|
||||
// init variables
|
||||
OSRM.GUI.setRoutingEngine( OSRM.DEFAULTS.ROUTING_ENGINE );
|
||||
|
||||
OSRM.G.markers = new OSRM.Markers();
|
||||
OSRM.G.route = new OSRM.Route();
|
||||
OSRM.G.response = { via_points:[] };
|
||||
|
||||
@@ -30,9 +30,8 @@ onClickRouteDescription: function(lat, lng) {
|
||||
onClickCreateShortcut: function(src){
|
||||
src += '&z='+ OSRM.G.map.getZoom() + '¢er=' + 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 += '&df=' + OSRM.G.active_distance_format;
|
||||
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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user