Add test for route relation process in car.lua. Some fixes

This commit is contained in:
Denis Koronchik
2017-09-14 17:56:23 +03:00
committed by Patrick Niklaus
parent a05e9c4932
commit 3634aa9a3c
4 changed files with 86 additions and 9 deletions
+6 -2
View File
@@ -401,10 +401,14 @@ function process_way(profile, way, result, relations)
-- now process relations data
local matched_refs = nil;
if result.ref then
matched_refs = Relations.MatchToRef(relations, result.ref)
local match_res = Relations.match_to_ref(relations, result.ref)
order = match_res['order']
matched_refs = match_res['match']
local ref = ''
for k, v in pairs(matched_refs) do
for _, k in pairs(order) do
local v = matched_refs[k]
if ref ~= '' then
ref = ref .. '; '
end