jsrouting: mouseover an instruction, highlight the route segment

This commit is contained in:
Dan Stowell 2014-03-09 09:37:42 +00:00
parent eab2eeaa47
commit 15f0367e7f
4 changed files with 41 additions and 8 deletions

View file

@ -42,7 +42,7 @@ GraphHopperEngine.prototype.createConfig = function() {
instrText += instr.descriptions[i];
var latlng = instr.latLngs[i];
var distInMeter = instr.distances[i];
steps.push([{lat: latlng[0], lng: latlng[1]}, instrCode, instrText, distInMeter]);
steps.push([{lat: latlng[0], lng: latlng[1]}, instrCode, instrText, distInMeter, []]); // TODO does graphhopper map instructions onto line indices?
}
router.setItinerary({ steps: steps, distance: data.route.distance, time: data.route['time']/1000 });
return true;