diff --git a/WebContent/OSRM.Localization.js b/WebContent/OSRM.Localization.js index 48d02d2f9..b3f0225b6 100644 --- a/WebContent/OSRM.Localization.js +++ b/WebContent/OSRM.Localization.js @@ -40,7 +40,7 @@ OSRM.loc = OSRM.Localization.translate; OSRM.Localization["de"] = { //gui "GUI_START": "Start", -"GUI_END": "Ende", +"GUI_END": "Ziel", "GUI_RESET": "Reset", "GUI_SEARCH": "Suchen", "GUI_ROUTE": "Route", @@ -54,6 +54,8 @@ OSRM.Localization["de"] = { "SEARCH_RESULTS": "Suchergebnisse", "TIMED_OUT": "Zeitüberschreitung", "NO_RESULTS_FOUND": "Keine Ergebnisse gefunden", +"NO_RESULTS_FOUND_SOURCE": "Keine Ergebnisse gefunden für Start", +"NO_RESULTS_FOUND_TARGET": "Keine Ergebnisse gefunden für Ziel", // routing "ROUTE_DESCRIPTION": "Routenbeschreibung", "GET_LINK": "Generiere Link", @@ -85,6 +87,8 @@ OSRM.Localization["en"] = { "SEARCH_RESULTS": "Search Results", "TIMED_OUT": "Timed Out", "NO_RESULTS_FOUND": "No results found", +"NO_RESULTS_FOUND_SOURCE": "No results found for start", +"NO_RESULTS_FOUND_TARGET": "No results found for end", //routing "ROUTE_DESCRIPTION": "Route Description", "GET_LINK": "Generate Link", diff --git a/WebContent/geocoder.js b/WebContent/geocoder.js index ea1a8b843..6b08907b5 100644 --- a/WebContent/geocoder.js +++ b/WebContent/geocoder.js @@ -78,7 +78,7 @@ function showGeocoderResults_Target(response) { showGeocoderResults(OSRM.TARGET_ function showGeocoderResults(marker_id, response) { if(response){ if(response.length == 0) { - showGeocoderResults_Empty(); + showGeocoderResults_Empty(marker_id); return; } @@ -108,9 +108,14 @@ function showGeocoderResults(marker_id, response) { onclickGeocoderResult(marker_id, response[0].lat, response[0].lon); } } -function showGeocoderResults_Empty() { +function showGeocoderResults_Empty(marker_id) { document.getElementById('information-box-headline').innerHTML = OSRM.loc("SEARCH_RESULTS")+":"; - document.getElementById('information-box').innerHTML = "

"+OSRM.loc("NO_RESULTS_FOUND")+".

"; + if(marker_id == OSRM.SOURCE_MARKER_LABEL) + document.getElementById('information-box').innerHTML = "

"+OSRM.loc("NO_RESULTS_FOUND_SOURCE")+".

"; + else if(marker_id == OSRM.TARGET_MARKER_LABEL) + document.getElementById('information-box').innerHTML = "

"+OSRM.loc("NO_RESULTS_FOUND_TARGET")+".

"; + else + document.getElementById('information-box').innerHTML = "

"+OSRM.loc("NO_RESULTS_FOUND")+".

"; } function showGeocoderResults_Timeout() { document.getElementById('information-box-headline').innerHTML = OSRM.loc("SEARCH_RESULTS")+":"; diff --git a/WebContent/images/cancel.png b/WebContent/images/cancel.png index c75faf4ed..e0ffbcf48 100644 Binary files a/WebContent/images/cancel.png and b/WebContent/images/cancel.png differ diff --git a/WebContent/images/cancel_active.png b/WebContent/images/cancel_active.png index ba9379e17..0abe88c83 100644 Binary files a/WebContent/images/cancel_active.png and b/WebContent/images/cancel_active.png differ diff --git a/WebContent/images/cancel_hover.png b/WebContent/images/cancel_hover.png index 23333b280..ef03a227a 100644 Binary files a/WebContent/images/cancel_hover.png and b/WebContent/images/cancel_hover.png differ diff --git a/WebContent/images/gui.pdf b/WebContent/images/gui.pdf new file mode 100644 index 000000000..497b124c5 Binary files /dev/null and b/WebContent/images/gui.pdf differ diff --git a/WebContent/images/restore.png b/WebContent/images/restore.png new file mode 100644 index 000000000..8db6754d4 Binary files /dev/null and b/WebContent/images/restore.png differ diff --git a/WebContent/images/restore_active.png b/WebContent/images/restore_active.png new file mode 100644 index 000000000..ef8d1cee6 Binary files /dev/null and b/WebContent/images/restore_active.png differ diff --git a/WebContent/images/restore_hover.png b/WebContent/images/restore_hover.png new file mode 100644 index 000000000..94d2aa32f Binary files /dev/null and b/WebContent/images/restore_hover.png differ diff --git a/WebContent/main.css b/WebContent/main.css index e2ae5ad18..eaf6fba2a 100644 --- a/WebContent/main.css +++ b/WebContent/main.css @@ -109,7 +109,7 @@ html, body, #map { padding:0px; } -.main-toggle +.main-toggle-out { cursor:pointer; position:absolute; @@ -119,14 +119,32 @@ html, body, #map { height:16px; background-image:url("images/cancel.png"); } -.main-toggle:hover +.main-toggle-out:hover { background-image:url("images/cancel_hover.png"); } -.main-toggle:active +.main-toggle-out:active { background-image:url("images/cancel_active.png"); } +.main-toggle-in +{ + cursor:pointer; + position:absolute; + right:5px; + top:5px; + width:16px; + height:16px; + background-image:url("images/restore.png"); +} +.main-toggle-in:hover +{ + background-image:url("images/restore_hover.png"); +} +.main-toggle-in:active +{ + background-image:url("images/restore_active.png"); +} .main-options { diff --git a/WebContent/main.html b/WebContent/main.html index 6f476f6cf..587386acb 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -68,7 +68,7 @@ or see http://www.gnu.org/licenses/agpl.txt.

-
+
@@ -77,21 +77,21 @@ or see http://www.gnu.org/licenses/agpl.txt.
-
+
- + - + diff --git a/WebContent/routing.js b/WebContent/routing.js index 6b09a785f..b758f9f11 100644 --- a/WebContent/routing.js +++ b/WebContent/routing.js @@ -408,7 +408,17 @@ function getDirectionIcon(name) { // click: button "route" function startRouting() { - getRoute(OSRM.FULL_DESCRIPTION); + my_route.hideRoute(); + my_markers.removeAll(); + my_markers.highlight.hide(); + + document.getElementById('information-box').innerHTML = ""; + document.getElementById('information-box-headline').innerHTML = ""; + + callGeocoder(OSRM.SOURCE_MARKER_LABEL, document.getElementById('input-source-name').value); + callGeocoder(OSRM.TARGET_MARKER_LABEL, document.getElementById('input-target-name').value); + //getRoute(OSRM.FULL_DESCRIPTION); + //TODO: center map on route } // click: button "reset"
Start: Suchen
Ende: Suchen