diff options
Diffstat (limited to 'lib/tom_tom/matrix.rb')
| -rw-r--r-- | lib/tom_tom/matrix.rb | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/tom_tom/matrix.rb b/lib/tom_tom/matrix.rb index 985055dae..4ef620f99 100644 --- a/lib/tom_tom/matrix.rb +++ b/lib/tom_tom/matrix.rb @@ -32,8 +32,20 @@ module TomTom points = Set.new way_costs.each do |way_cost| - points.add(way_cost.departure) - points.add(way_cost.arrival) + ids = way_cost.id.split('-') + + points.add( + TomTom::Matrix::Point.new( + way_cost.departure, + ids[0] + ) + ) + points.add( + TomTom::Matrix::Point.new( + way_cost.arrival, + ids[1] + ) + ) end points |
