Fix incorrect weight fallback for distance-based weights

This commit is contained in:
Michael Krasnyk
2017-04-18 22:31:49 +02:00
parent e96545be2e
commit c81baae1b9
2 changed files with 26 additions and 1 deletions
+1 -1
View File
@@ -441,7 +441,7 @@ end
function Handlers.handle_weights(way,result,data,profile)
if properties.weight_name == 'distance' then
result.weight = 0
result.weight = -1
-- set weight rates to 1 for the distance weight, edge weights are distance / rate
if (result.forward_mode ~= mode.inaccessible and result.forward_speed > 0) then
result.forward_rate = 1