shortener reply parameter name flexible,

check if reply is correct,
beautified continue marker
This commit is contained in:
DennisSchiefer 2012-04-27 12:13:27 +01:00
parent fbe722465d
commit a3cfd49f97
3 changed files with 5 additions and 1 deletions

View File

@ -36,6 +36,7 @@ OSRM.DEFAULTS = {
//GEOCODER_BOUNDS: '&bounded=1&viewbox=-27.0,72.0,46.0,36.0', // bounds for Europe //GEOCODER_BOUNDS: '&bounded=1&viewbox=-27.0,72.0,46.0,36.0', // bounds for Europe
SHORTENER_PARAMETERS: '%url&jsonp=%jsonp', SHORTENER_PARAMETERS: '%url&jsonp=%jsonp',
SHORTENER_REPLY_PARAMETER: 'ShortURL',
LANGUAGE: "en", LANGUAGE: "en",
LANGUAGE_FILES_DIRECTORY: "localization/", LANGUAGE_FILES_DIRECTORY: "localization/",

Binary file not shown.

View File

@ -38,7 +38,10 @@ onClickCreateShortcut: function(src){
document.getElementById('route-link').innerHTML = '['+OSRM.loc("GENERATE_LINK_TO_ROUTE")+']'; document.getElementById('route-link').innerHTML = '['+OSRM.loc("GENERATE_LINK_TO_ROUTE")+']';
}, },
showRouteLink: function(response){ showRouteLink: function(response){
document.getElementById('route-link').innerHTML = '[<a class="route-link text-selectable" href="' +response.ShortURL+ '">'+response.ShortURL+'</a>]'; if(!response[OSRM.DEFAULTS.SHORTENER_REPLY_PARAMETER])
OSRM.RoutingDescription.showRouteLink_TimeOut();
else
document.getElementById('route-link').innerHTML = '[<a class="route-link text-selectable" href="' +response[OSRM.DEFAULTS.SHORTENER_REPLY_PARAMETER]+ '">'+response[OSRM.DEFAULTS.SHORTENER_REPLY_PARAMETER]+'</a>]';
}, },
showRouteLink_TimeOut: function(){ showRouteLink_TimeOut: function(){
document.getElementById('route-link').innerHTML = '['+OSRM.loc("LINK_TO_ROUTE_TIMEOUT")+']'; document.getElementById('route-link').innerHTML = '['+OSRM.loc("LINK_TO_ROUTE_TIMEOUT")+']';