Jump to content

Module:Jcon/data and Module:Jcon/data/sandbox: Difference between pages

(Difference between pages)
Page 1
Page 2
Content deleted Content added
Tag: Replaced
 
Add comment
 
Line 1: Line 1:
local p = {}
local p = {}
local ON = require('Module:Road data/strings/CAN/ON')


-- MTO signs - Table mapping sign names to their image
-- MTO signs - Table mapping sign names to their image
p._signs = {
p.signs = {
['hospital'] = 'Ontario M401.svg',
['hospital'] = 'Ontario M401.svg',
['airport'] = 'Ontario M502.svg',
['airport'] = 'Ontario M502.svg',
Line 13: Line 14:


-- Place types to strip when processing road types
-- Place types to strip when processing road types
p._placeTypes = {
p.placeTypes = {
'municipality',
'municipality',
'municipal',
'municipal',
Line 28: Line 29:
}
}


-- Road types from Module:Road_data/strings/CAN/ON
-- Map of lowercase types to properly cased types at Module:Road_data/strings/CAN/ON
p.typeMap = {}
local ON = require('Module:Road data/strings/CAN/ON')


for type, def in pairs(ON) do
for type, _ in pairs(ON) do
p[string.lower(type)] = def
p.typeMap[string.lower(type)] = type
end
end