Module:OrganizationsMap: Difference between revisions
No edit summary |
No edit summary |
||
Line 4: | Line 4: | ||
-- local args = frame:getParent().args | -- local args = frame:getParent().args | ||
local | local arr = mw.visualdata.query( 'Organization', '[[name::+]]', {}, {} ) | ||
local ret = {} | |||
for k, v in pairs(ret) do | |||
table.insert(ret, v.data.geolocation.latitude .. ',' .. v.data.geolocation.longitude) | |||
end | |||
return ret; | |||
-- Gent, Belgie~The city Ghent~Ghent is awesome~ ~ ~Ghent | -- Gent, Belgie~The city Ghent~Ghent is awesome~ ~ ~Ghent | ||
Line 12: | Line 17: | ||
-- Antwerp~The city Antwerp~ ~ ~ ~Antwerp | -- Antwerp~The city Antwerp~ ~ ~ ~Antwerp | ||
-- return mw.text.jsonEncode(ret) | |||
return mw.text.jsonEncode(ret) | |||
end | end | ||
return p | return p |
Revision as of 15:33, 5 December 2024
Documentation for this module may be created at Module:OrganizationsMap/doc
local p = {}
function p.main(frame)
-- local args = frame:getParent().args
local arr = mw.visualdata.query( 'Organization', '[[name::+]]', {}, {} )
local ret = {}
for k, v in pairs(ret) do
table.insert(ret, v.data.geolocation.latitude .. ',' .. v.data.geolocation.longitude)
end
return ret;
-- Gent, Belgie~The city Ghent~Ghent is awesome~ ~ ~Ghent
-- Brussel~The city Brussel~The capital of Belgium~ ~ ~Brussels
-- Antwerp~The city Antwerp~ ~ ~ ~Antwerp
-- return mw.text.jsonEncode(ret)
end
return p