diff --git a/WebContent/OSRM.config.js b/WebContent/OSRM.config.js index 87abad117..8d25bd4e1 100644 --- a/WebContent/OSRM.config.js +++ b/WebContent/OSRM.config.js @@ -35,6 +35,8 @@ OSRM.DEFAULTS = { GEOCODER_BOUNDS: '', // the world is not enough! //GEOCODER_BOUNDS: '&bounded=1&viewbox=-27.0,72.0,46.0,36.0', // bounds for Europe + SHORTENER_PARAMETERS: '%url&jsonp=%jsonp', + LANGUAGE: "en", LANGUAGE_FILES_DIRECTORY: "localization/", LANUGAGE_ONDEMAND_RELOADING: true, diff --git a/WebContent/routing/OSRM.RoutingDescription.js b/WebContent/routing/OSRM.RoutingDescription.js index e41d0bf92..efbc8e4df 100644 --- a/WebContent/routing/OSRM.RoutingDescription.js +++ b/WebContent/routing/OSRM.RoutingDescription.js @@ -31,7 +31,10 @@ onClickRouteDescription: function(geometry_index) { }, onClickCreateShortcut: function(src){ src += '&z='+ OSRM.G.map.getZoom() + '¢er=' + OSRM.G.map.getCenter().lat.toFixed(6) + ',' + OSRM.G.map.getCenter().lng.toFixed(6); - OSRM.JSONP.call(OSRM.DEFAULTS.HOST_SHORTENER_URL+src, OSRM.RoutingDescription.showRouteLink, OSRM.RoutingDescription.showRouteLink_TimeOut, OSRM.DEFAULTS.JSONP_TIMEOUT, 'shortener'); + + var source = OSRM.DEFAULTS.SHORTENER_PARAMETERS.replace(/%url/, OSRM.DEFAULTS.HOST_SHORTENER_URL+src); + + OSRM.JSONP.call(source, OSRM.RoutingDescription.showRouteLink, OSRM.RoutingDescription.showRouteLink_TimeOut, OSRM.DEFAULTS.JSONP_TIMEOUT, 'shortener'); document.getElementById('route-link').innerHTML = '['+OSRM.loc("GENERATE_LINK_TO_ROUTE")+']'; }, showRouteLink: function(response){