Bump api_version to 3 in car.lua

This commit is contained in:
Michael Krasnyk
2017-09-21 15:18:11 +02:00
parent a7c1967ca0
commit fec2b602a2
4 changed files with 10 additions and 9 deletions
+4 -3
View File
@@ -1,6 +1,6 @@
-- Car profile
api_version = 2
api_version = 3
Set = require('lib/set')
Sequence = require('lib/sequence')
@@ -303,7 +303,7 @@ function process_node(profile, node, result)
end
end
function process_way(profile, way, result, location_data)
function process_way(profile, way, result, relations, location_data)
-- the intial filtering of ways based on presence of tags
-- affects processing times significantly, because all ways
-- have to be checked.
@@ -387,7 +387,8 @@ function process_way(profile, way, result, location_data)
WayHandlers.weights
}
WayHandlers.run(profile, way, result, data, handlers, location_data)
print (profile, way, result, data, handlers, relations, location_data)
WayHandlers.run(profile, way, result, data, handlers, relations, location_data)
end
function process_turn(profile, turn)
+3 -3
View File
@@ -552,7 +552,7 @@ function WayHandlers.blocked_ways(profile,way,result,data)
end
end
function WayHandlers.driving_side(profile, way, result, data, location_data)
function WayHandlers.driving_side(profile, way, result, data, relations, location_data)
local driving_side = way:get_value_by_key("driving_side")
if driving_side == 'left' then
result.is_left_hand_driving = true
@@ -584,9 +584,9 @@ end
-- if the handler chain should be aborted.
-- To ensure the correct order of method calls, use a Sequence of handler names.
function WayHandlers.run(profile, way, result, data, handlers, location_data)
function WayHandlers.run(profile, way, result, data, handlers, relatons, location_data)
for i,handler in ipairs(handlers) do
if handler(profile, way, result, data, location_data) == false then
if handler(profile, way, result, data, relatons, location_data) == false then
return false
end
end
+1 -1
View File
@@ -5,7 +5,7 @@
-- Secondary road: 18km/h = 18000m/3600s = 100m/20s
-- Tertiary road: 12km/h = 12000m/3600s = 100m/30s
api_version = 2
api_version = 3
function setup()
return {