diff --git a/WebContent/main.html b/WebContent/main.html
index 4d7428776..e2787bedb 100644
--- a/WebContent/main.html
+++ b/WebContent/main.html
@@ -88,14 +88,14 @@ or see http://www.gnu.org/licenses/agpl.txt.
diff --git a/WebContent/routing.js b/WebContent/routing.js
index 3dec6cb3d..8bd7405ad 100644
--- a/WebContent/routing.js
+++ b/WebContent/routing.js
@@ -474,10 +474,22 @@ function reverseRouting() {
}
// click: button "show"
-function centerMarker(marker_id) {
+function showMarker(marker_id) {
if( marker_id == OSRM.C.SOURCE_LABEL && OSRM.G.markers.hasSource() && !OSRM.G.markers.route[0].dirty_type ) {
OSRM.G.markers.route[0].centerView();
} else if( marker_id == OSRM.C.TARGET_LABEL && OSRM.G.markers.hasTarget() && !OSRM.G.markers.route[OSRM.G.markers.route.length-1].dirty_type) {
OSRM.G.markers.route[OSRM.G.markers.route.length-1].centerView();
}
}
+
+
+// changed: any inputbox (is called when return is pressed [after] or focus is lost [before])
+function inputChanged(marker_id) {
+ if( marker_id == OSRM.C.SOURCE_LABEL){
+ if( OSRM.G.markers.hasSource() ) OSRM.G.markers.route[0].dirty_type = true;
+ callGeocoder(OSRM.C.SOURCE_LABEL, document.getElementById('input-source-name').value);
+ } else if( marker_id == OSRM.C.TARGET_LABEL) {
+ if( OSRM.G.markers.hasTarget() ) OSRM.G.markers.route[OSRM.G.markers.route.length-1].dirty_type = true;
+ callGeocoder(OSRM.C.TARGET_LABEL, document.getElementById('input-target-name').value);
+ }
+}