diff --git a/WebContent/OSRM.config.js b/WebContent/OSRM.config.js index 7c817671b..dac56d84c 100644 --- a/WebContent/OSRM.config.js +++ b/WebContent/OSRM.config.js @@ -19,7 +19,8 @@ or see http://www.gnu.org/licenses/agpl.txt. // [has to be loaded directly after OSRM.base] OSRM.DEFAULTS = { - HOST_ROUTING_URL: 'http://router.project-osrm.org/viaroute', + //HOST_ROUTING_URL: 'http://router.project-osrm.org/viaroute', + HOST_ROUTING_URL: 'http://i10pc68:5000/viaroute', HOST_SHORTENER_URL: 'http://map.project-osrm.org/shorten/', HOST_TIMESTAMP_URL: 'http://router.project-osrm.org/timestamp', HOST_GEOCODER_URL: 'http://nominatim.openstreetmap.org/search', diff --git a/WebContent/base/OSRM.HistoryRoutes.js b/WebContent/base/OSRM.HistoryRoutes.js index c87c7be3d..3507b3b40 100644 --- a/WebContent/base/OSRM.HistoryRoutes.js +++ b/WebContent/base/OSRM.HistoryRoutes.js @@ -136,10 +136,8 @@ OSRM.extend( OSRM.HistoryRoute,{ if(positions.length == 0) return route; - route.push( {lat: positions[0].lat, lng: positions[0].lng }); for(var i=0; i nearest_index) { - new_via_index = i; + for(var i=1; i nearest_index) { + new_via_index = i-1; break; } } diff --git a/WebContent/routing/OSRM.Routing.js b/WebContent/routing/OSRM.Routing.js index 71587d3e0..8dccb7f63 100644 --- a/WebContent/routing/OSRM.Routing.js +++ b/WebContent/routing/OSRM.Routing.js @@ -171,14 +171,11 @@ _updateHints: function(response) { // snap all markers to the received route _snapRoute: function() { - var positions = OSRM.G.route.getPositions(); var markers = OSRM.G.markers.route; var via_points = OSRM.G.response.via_points; - markers[0].setPosition( positions[0] ); - markers[markers.length-1].setPosition( positions[positions.length-1] ); for(var i=0; i