diff --git a/WebContent/OSRM.GUI.js b/WebContent/OSRM.GUI.js index 6d4c3841d..a1f780dec 100644 --- a/WebContent/OSRM.GUI.js +++ b/WebContent/OSRM.GUI.js @@ -44,12 +44,10 @@ init: function() { document.getElementById("gui-printer").onclick = OSRM.Printing.print; document.getElementById("gui-input-source").onchange = function() {OSRM.RoutingGUI.inputChanged(OSRM.C.SOURCE_LABEL);}; - document.getElementById("gui-input-source").onkeyup = function(e) {OSRM.RoutingGUI.keyUp(e,OSRM.C.SOURCE_LABEL);}; document.getElementById("gui-delete-source").onclick = function() {OSRM.RoutingGUI.deleteMarker(OSRM.C.SOURCE_LABEL);}; document.getElementById("gui-search-source").onclick = function() {OSRM.RoutingGUI.showMarker(OSRM.C.SOURCE_LABEL);}; document.getElementById("gui-input-target").onchange = function() {OSRM.RoutingGUI.inputChanged(OSRM.C.TARGET_LABEL);}; - document.getElementById("gui-input-target").onkeyup = function(e) {OSRM.RoutingGUI.keyUp(e,OSRM.C.TARGET_LABEL);}; document.getElementById("gui-delete-target").onclick = function() {OSRM.RoutingGUI.deleteMarker(OSRM.C.TARGET_LABEL);}; document.getElementById("gui-search-target").onclick = function() {OSRM.RoutingGUI.showMarker(OSRM.C.TARGET_LABEL);}; @@ -129,6 +127,12 @@ toggleOptions: function() { } else { document.getElementById('options-box').style.visibility="visible"; } +}, + +// clear output area +clearResults: function() { + document.getElementById('information-box').innerHTML = ""; + document.getElementById('information-box-header').innerHTML = ""; } }; diff --git a/WebContent/OSRM.Geocoder.js b/WebContent/OSRM.Geocoder.js index d02029e51..b81f2ef20 100644 --- a/WebContent/OSRM.Geocoder.js +++ b/WebContent/OSRM.Geocoder.js @@ -79,7 +79,7 @@ _showResults: function(response, parameters) { // show first result OSRM.Geocoder._onclickResult(parameters.marker_id, response[0].lat, response[0].lon); - if( OSRM.G.markers.route.length > 1 ) + if( OSRM.G.markers.route.length > 1 ) // if a route is displayed, we don't need to show other possible geocoding results return; // show possible results for input diff --git a/WebContent/OSRM.Markers.js b/WebContent/OSRM.Markers.js index a86e4853f..cdc30e2f5 100644 --- a/WebContent/OSRM.Markers.js +++ b/WebContent/OSRM.Markers.js @@ -109,7 +109,9 @@ onDragStart: function(e) { } if( this.parent != OSRM.G.markers.highlight) - OSRM.G.markers.highlight.hide(); + OSRM.G.markers.highlight.hide(); + if( this.parent != OSRM.G.markers.dragger) + OSRM.G.markers.dragger.hide(); if (OSRM.G.route.isShown()) OSRM.G.route.showOldRoute(); }, @@ -124,8 +126,7 @@ onDragEnd: function(e) { OSRM.G.route.hideUnnamedRoute(); } else { OSRM.Geocoder.updateAddress(this.parent.label); - document.getElementById('information-box').innerHTML = ""; // do we want this? - document.getElementById('information-box-header').innerHTML = ""; + OSRM.GUI.clearResults(); } }, toString: function() { diff --git a/WebContent/localization/OSRM.Locale.de.js b/WebContent/localization/OSRM.Locale.de.js index b0029cab0..7ba28b514 100644 --- a/WebContent/localization/OSRM.Locale.de.js +++ b/WebContent/localization/OSRM.Locale.de.js @@ -59,10 +59,11 @@ OSRM.Localization["de"] = { "SW": "Südwest", "NW": "Nordwest", // driving directions +"DIRECTION_0":"Unbekannte Anweisung[ auf %s]", "DIRECTION_1":"Links abbiegen[ auf %s]", "DIRECTION_2":"Rechts abbiegen[ auf %s]", "DIRECTION_3":"Umkehren[ auf %s]", -"DIRECTION_4":"Fahren Sie Richtung %s", +"DIRECTION_4":"Fahren Sie Richtung %s", "DIRECTION_5":"Weiterfahren[ auf %s]", "DIRECTION_6":"Leicht links abbiegen[ auf %s]", "DIRECTION_7":"Leicht rechts abbiegen[ auf %s]", @@ -72,7 +73,7 @@ OSRM.Localization["de"] = { "DIRECTION_11":"In den Kreisverkehr einfahren und bei zweiter Möglichkeit verlassen[ auf %s]", "DIRECTION_12":"In den Kreisverkehr einfahren und bei dritter Möglichkeit verlassen[ auf %s]", "DIRECTION_13":"In den Kreisverkehr einfahren und bei vierter Möglichkeit verlassen[ auf %s]", -"DIRECTION_14":"In den Kreisverkehr einfahren und bei f�nfter Möglichkeit verlassen[ auf %s]", +"DIRECTION_14":"In den Kreisverkehr einfahren und bei fünfter Möglichkeit verlassen[ auf %s]", "DIRECTION_15":"In den Kreisverkehr einfahren und bei sechster Möglichkeit verlassen[ auf %s]", "DIRECTION_16":"In den Kreisverkehr einfahren und bei siebter Möglichkeit verlassen[ auf %s]", "DIRECTION_17":"In den Kreisverkehr einfahren und bei achter Möglichkeit verlassen[ auf %s]", diff --git a/WebContent/localization/OSRM.Locale.en.js b/WebContent/localization/OSRM.Locale.en.js index a063d9fa5..86331ad33 100644 --- a/WebContent/localization/OSRM.Locale.en.js +++ b/WebContent/localization/OSRM.Locale.en.js @@ -59,10 +59,11 @@ OSRM.Localization["en"] = { "SW": "southwest", "NW": "northwest", // driving directions +"DIRECTION_0":"Unknown instruction[ on %s]", "DIRECTION_1":"Turn left[ on %s]", "DIRECTION_2":"Turn right[ on %s]", "DIRECTION_3":"U-Turn[ on %s]", -"DIRECTION_4":"Head %s", +"DIRECTION_4":"Head %s", "DIRECTION_5":"Continue[ on %s]", "DIRECTION_6":"Turn slight left[ on %s]", "DIRECTION_7":"Turn slight right[ on %s]", diff --git a/WebContent/localization/OSRM.Localization.js b/WebContent/localization/OSRM.Localization.js index 4063a619b..cc121b29f 100644 --- a/WebContent/localization/OSRM.Localization.js +++ b/WebContent/localization/OSRM.Localization.js @@ -30,6 +30,7 @@ init: function() { // create dropdown menu var select = document.createElement('select'); select.id = "gui-language-toggle"; + select.className = "top-left-button"; select.onchange = function() { OSRM.Localization.change(this.value); }; // fill dropdown menu @@ -67,7 +68,7 @@ change: function(language) { } else { var script = document.createElement('script'); script.type = 'text/javascript'; - script.src = "Localization/OSRM.Locale."+language+".js"; + script.src = "localization/OSRM.Locale."+language+".js"; document.head.appendChild(script); } }, diff --git a/WebContent/main.css b/WebContent/main.css index 3116951fe..02f695a1c 100644 --- a/WebContent/main.css +++ b/WebContent/main.css @@ -131,6 +131,10 @@ html, body { border: 0px; text-decoration:none; } +.top-left-button +{ + float:left; +} .top-right-button { float:right; diff --git a/WebContent/main.html b/WebContent/main.html index e6be48e39..b7af1bbc4 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -64,8 +64,8 @@ or see http://www.gnu.org/licenses/agpl.txt. - - + + diff --git a/WebContent/routing/OSRM.RoutingDescription.js b/WebContent/routing/OSRM.RoutingDescription.js index d632efca0..0fde40312 100644 --- a/WebContent/routing/OSRM.RoutingDescription.js +++ b/WebContent/routing/OSRM.RoutingDescription.js @@ -72,21 +72,22 @@ show: function(response) { route_desc += '