From 6a9216d6e4c24bcb299cc0e9736d02a6cae65d74 Mon Sep 17 00:00:00 2001 From: DennisSchiefer Date: Fri, 16 Mar 2012 09:42:14 +0100 Subject: [PATCH] added functions to check whether source or target exists, readded routing button --- WebContent/OSRM.Localization.js | 4 ++-- WebContent/OSRM.Markers.js | 10 ++++++++++ WebContent/main.html | 5 +---- 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/WebContent/OSRM.Localization.js b/WebContent/OSRM.Localization.js index 003dd9ab9..1fa979c9c 100644 --- a/WebContent/OSRM.Localization.js +++ b/WebContent/OSRM.Localization.js @@ -82,8 +82,8 @@ OSRM.Localization["en"] = { //gui "GUI_START": "Start", "GUI_END": "End", -"GUI_RESET": "  Reset  ", -"GUI_SEARCH": " Search ", +"GUI_RESET": "Reset", +"GUI_SEARCH": "Search", "GUI_ROUTE": "Route", "GUI_REVERSE": "Reverse", "GUI_OPTIONS": "Options", diff --git a/WebContent/OSRM.Markers.js b/WebContent/OSRM.Markers.js index 770cc008f..8cca3c3d5 100644 --- a/WebContent/OSRM.Markers.js +++ b/WebContent/OSRM.Markers.js @@ -206,5 +206,15 @@ removeMarker: function(id) { this.route[id].hide(); this.route.splice(id, 1); +}, +hasSource: function() { + if( my_markers.route[0] && my_markers.route[0].label == OSRM.SOURCE_MARKER_LABEL ) + return true; + return false; +}, +hasTarget: function() { + if( my_markers.route[my_markers.route.length-1] && my_markers.route[my_markers.route.length-1].label == OSRM.TARGET_MARKER_LABEL ) + return true; + return false; } }); \ No newline at end of file diff --git a/WebContent/main.html b/WebContent/main.html index 9ae0b600c..c18c49644 100644 --- a/WebContent/main.html +++ b/WebContent/main.html @@ -108,11 +108,8 @@ or see http://www.gnu.org/licenses/agpl.txt. - - +
Reset Reverse Route