diff --git a/AUTHORS.md b/AUTHORS.md index 8d6ac377e..6c826c51f 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -10,4 +10,5 @@ Jean-Frederic Zbigniew Czernik Jonas Häggqvist Sabas -Paul Spencer \ No newline at end of file +Paul Spencer +Raphaël Pinson \ No newline at end of file diff --git a/WebContent/base/OSRM.Geocoder.js b/WebContent/base/OSRM.Geocoder.js index 15f781418..4d38738ba 100644 --- a/WebContent/base/OSRM.Geocoder.js +++ b/WebContent/base/OSRM.Geocoder.js @@ -44,6 +44,9 @@ call: function(marker_id, query) { //build request for geocoder var call = OSRM.DEFAULTS.HOST_GEOCODER_URL + "?format=json&json_callback=%jsonp" + OSRM.DEFAULTS.GEOCODER_BOUNDS + "&accept-language="+OSRM.Localization.current_language+"&q=" + query; +// // prioritize results in given viewbox=,,, +// var bounds = OSRM.G.map.getBounds(); +// call += "&viewbox=" + bounds._southWest.lat + "," + bounds._northEast.lng + "," + bounds._northEast.lat + "," + bounds._southWest.lng; OSRM.JSONP.call( call, OSRM.Geocoder._showResults, OSRM.Geocoder._showResults_Timeout, OSRM.DEFAULTS.JSONP_TIMEOUT, "geocoder_"+marker_id, {marker_id:marker_id,query:query} ); }, diff --git a/WebContent/routing/OSRM.Routing.js b/WebContent/routing/OSRM.Routing.js index 8dccb7f63..282980aa0 100644 --- a/WebContent/routing/OSRM.Routing.js +++ b/WebContent/routing/OSRM.Routing.js @@ -181,6 +181,10 @@ _snapRoute: function() { OSRM.Geocoder.updateAddress(OSRM.C.TARGET_LABEL); OSRM.G.markers.relabelViaMarkers(); + +// focus on route after computation +// var bounds = new L.LatLngBounds( OSRM.G.route._current_route.getPositions() ); +// OSRM.G.map.fitBoundsUI(bounds); } };