diff --git a/WebContent/OSRM.JSONP.js b/WebContent/OSRM.JSONP.js
index 95d92f14d..38af68549 100644
--- a/WebContent/OSRM.JSONP.js
+++ b/WebContent/OSRM.JSONP.js
@@ -23,10 +23,6 @@ OSRM.JSONP = {
// wrap timeout function
OSRM.JSONP.timeouts[id] = function(response) {
- if( OSRM.JSONP.fences[id] == undefined ){ // fence to prevent execution after timeout function (when precompiled!)
- //OSRM.debug.log("x");
- return;
- }
timeout_function(response);
// var jsonp = document.getElementById('jsonp_'+id); // clean DOM
@@ -45,10 +41,8 @@ OSRM.JSONP = {
clearTimeout(OSRM.JSONP.timers[id]); // clear timeout timer
OSRM.JSONP.timers[id] = undefined;
- if( OSRM.JSONP.fences[id] == undefined ){ // fence to prevent execution after timeout function (when precompiled!)
- //OSRM.debug.log("y");
- return;
- }
+ if( OSRM.JSONP.fences[id] == undefined ) // fence to prevent execution after timeout function (when precompiled!)
+ return;
callback_function(response); // actual wrapped callback
diff --git a/WebContent/OSRM.Markers.js b/WebContent/OSRM.Markers.js
index 277f6f633..ff11c7d72 100644
--- a/WebContent/OSRM.Markers.js
+++ b/WebContent/OSRM.Markers.js
@@ -43,7 +43,8 @@ centerView: function(zooming) {
var zoom = OSRM.DEFAULTS.ZOOM_LEVEL;
if( zooming == false )
zoom = map.getZoom();
- map.setView( new L.LatLng( this.position.lat, this.position.lng-0.02), zoom); // dirty hack
+ //map.setView( new L.LatLng( this.position.lat, this.position.lng-0.02), zoom); // dirty hack
+ map.setView( new L.LatLng( this.position.lat, this.position.lng), zoom);
},
toString: function() {
return "OSRM.Marker: \""+this.label+"\", "+this.position+")";
@@ -94,8 +95,8 @@ onDrag: function(e) {
this.parent.setPosition( e.target.getLatLng() );
if(OSRM.dragging == true) // TODO: hack to deal with drag events after dragend event
getRoute(OSRM.NO_DESCRIPTION);
-// else
-// getRoute(OSRM.FULL_DESCRIPTION);
+ else
+ getRoute(OSRM.FULL_DESCRIPTION);
updateLocation( this.parent.label );
},
diff --git a/WebContent/geocoder.js b/WebContent/geocoder.js
index 3cd83d294..2df228ba0 100644
--- a/WebContent/geocoder.js
+++ b/WebContent/geocoder.js
@@ -8,11 +8,20 @@ OSRM.TARGET_MARKER_LABEL = "target";
// update locations in input boxes
function updateLocation(marker_id) {
if (marker_id == OSRM.SOURCE_MARKER_LABEL) {
- document.getElementById("input-source-name").value = my_markers.route[0].getPosition().lat.toFixed(6) + ", " + my_markers.route[0].getPosition().lng.toFixed(6);
+ document.getElementById("input-source-name").value = my_markers.route[0].getPosition().lat.toFixed(6) + ", " + my_markers.route[0].getPosition().lng.toFixed(6);
} else if (marker_id == OSRM.TARGET_MARKER_LABEL) {
document.getElementById("input-target-name").value = my_markers.route[my_markers.route.length-1].getPosition().lat.toFixed(6) + ", " + my_markers.route[my_markers.route.length-1].getPosition().lng.toFixed(6);
}
}
+function updateReverseGeocoder(marker_id) {
+ if (marker_id == OSRM.SOURCE_MARKER_LABEL) {
+ document.getElementById("input-source-name").value = my_markers.route[0].getPosition().lat.toFixed(6) + ", " + my_markers.route[0].getPosition().lng.toFixed(6);
+ callReverseGeocoder("source", my_markers.route[0].getPosition().lat, my_markers.route[0].getPosition().lng);
+ } else if (marker_id == OSRM.TARGET_MARKER_LABEL) {
+ document.getElementById("input-target-name").value = my_markers.route[my_markers.route.length-1].getPosition().lat.toFixed(6) + ", " + my_markers.route[my_markers.route.length-1].getPosition().lng.toFixed(6);
+ callReverseGeocoder("target", my_markers.route[my_markers.route.length-1].getPosition().lat, my_markers.route[my_markers.route.length-1].getPosition().lng);
+ }
+}
function updateLocations() {
if( my_markers.route[0] && my_markers.route[0].label == OSRM.SOURCE_MARKER_LABEL) {
document.getElementById("input-source-name").value = my_markers.route[0].getPosition().lat.toFixed(6) + ", " + my_markers.route[0].getPosition().lng.toFixed(6);
@@ -78,6 +87,7 @@ function callGeocoder(marker_id, query) {
if(query.match(/^\s*[-+]?[0-9]*\.?[0-9]+\s*[,;]\s*[-+]?[0-9]*\.?[0-9]+\s*$/)){
var coord = query.split(/[,;]/);
onclickGeocoderResult(marker_id, coord[0], coord[1]);
+// updateReverseGeocoder(marker_id);
return;
}
diff --git a/WebContent/images/cancel.png b/WebContent/images/cancel.png
index 6e9a124d5..c75faf4ed 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 22d60ccc1..ba9379e17 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 8d007a335..23333b280 100644
Binary files a/WebContent/images/cancel_hover.png and b/WebContent/images/cancel_hover.png differ
diff --git a/WebContent/images/continue.png b/WebContent/images/continue.png
index 305310c55..50a54e0b9 100644
Binary files a/WebContent/images/continue.png and b/WebContent/images/continue.png differ
diff --git a/WebContent/images/default.png b/WebContent/images/default.png
index 7831bfe19..7e162eb62 100644
Binary files a/WebContent/images/default.png and b/WebContent/images/default.png differ
diff --git a/WebContent/images/marker-highlight.png b/WebContent/images/marker-highlight.png
index 1ec9ca60d..4583f6d1d 100644
Binary files a/WebContent/images/marker-highlight.png and b/WebContent/images/marker-highlight.png differ
diff --git a/WebContent/images/marker-source.png b/WebContent/images/marker-source.png
index 64e4ee146..d71768e57 100644
Binary files a/WebContent/images/marker-source.png and b/WebContent/images/marker-source.png differ
diff --git a/WebContent/images/marker-target.png b/WebContent/images/marker-target.png
index d543eae1d..c6b0e4934 100644
Binary files a/WebContent/images/marker-target.png and b/WebContent/images/marker-target.png differ
diff --git a/WebContent/images/marker-via.png b/WebContent/images/marker-via.png
index 1ba9a0a92..231ada929 100644
Binary files a/WebContent/images/marker-via.png and b/WebContent/images/marker-via.png differ
diff --git a/WebContent/images/osrm-logo.png b/WebContent/images/osrm-logo.png
index 83b3fc2ea..c3519dade 100644
Binary files a/WebContent/images/osrm-logo.png and b/WebContent/images/osrm-logo.png differ
diff --git a/WebContent/images/round-about.png b/WebContent/images/round-about.png
index f18d9ad3d..4b00bff6f 100644
Binary files a/WebContent/images/round-about.png and b/WebContent/images/round-about.png differ
diff --git a/WebContent/images/sharp-left.png b/WebContent/images/sharp-left.png
index 7abc9e980..18d2ff962 100644
Binary files a/WebContent/images/sharp-left.png and b/WebContent/images/sharp-left.png differ
diff --git a/WebContent/leaflet/images/layers.png b/WebContent/leaflet/images/layers.png
index 9be965fc8..3db9dd8db 100644
Binary files a/WebContent/leaflet/images/layers.png and b/WebContent/leaflet/images/layers.png differ
diff --git a/WebContent/main.html b/WebContent/main.html
index 98ec703f8..8c14d1c58 100644
--- a/WebContent/main.html
+++ b/WebContent/main.html
@@ -23,7 +23,7 @@
-
+
diff --git a/WebContent/main.js b/WebContent/main.js
index 2add3cfbf..7bee258b8 100644
--- a/WebContent/main.js
+++ b/WebContent/main.js
@@ -17,10 +17,10 @@ function init() {
// prefetch images
OSRM.images = Array();
function prefetchImages() {
- var images = [ 'http://map.project-osrm.org/new/images/marker-source.png',
- 'http://map.project-osrm.org/new/images/marker-target.png',
- 'http://map.project-osrm.org/new/images/marker-via.png',
- 'http://map.project-osrm.org/new/images/marker-highlight.png'
+ var images = [ 'images/marker-source.png',
+ 'images/marker-target.png',
+ 'images/marker-via.png',
+ 'images/marker-highlight.png'
];
for(var i=0; i