Module:Map icons
Jump to navigation
Jump to search
Module for displaying map icons based on pre-defined values.
Currently available values:
Value | Icon | Meaning |
---|---|---|
begin | Start of road | |
start | ||
city | Cities | |
companies | Company depots | |
crossing | Road junction | |
end | End of road | |
rest | Rest stop | |
service | Gas station | |
toll | Toll gate or toll plaza | |
tunnel | Tunnel or Channel Tunnel terminal |
local p = {}
function p.hello()
return 'Hello!'
end
function p.getMapIcon(frame)
local label = frame.args[1]
local imagename = ''
if label == 'begin' then
label = 'start'
end
if label == 'start' or label == 'end' or label == 'crossing' then
imagename = '[[File:Map icon Autobahn '..label..'.svg]]'
elseif label == 'city' or label == 'companies' then
imagename = '[[File:Map icon '..label..'.svg]]'
elseif label == 'service' then
imagename = '[[File:Gas_ico.png]]'
elseif label == 'rest' then
imagename = '[[File:Parking_ico.png]]'
elseif label == 'toll' then
imagename = '[[File:Road_toll_ico.png]]'
elseif label == 'tunnel' then
imagename = '[[File:Road_train_ico.png]]'
else
imagename = label
end
return imagename
end
return p