Module:Sandbox/trappist the monk/wd lat lon explained

require('strict');

local get_args = require ('Module:Arguments').getArgs;

--main}}

local function wikidata_lat_lon_get local qid = mw.wikibase.getEntityIdForCurrentPage; -- get the qid for the current page if qid then local value_t = mw.wikibase.getBestStatements (qid, 'P625')[1].mainsnak.datavalue.value; --point to the value table return value_t.latitude, value_t.longitude; endend

local function main local lat, lon = wikidata_lat_lon_get; if lat then return 'latitude: ' .. lat .. '; longitude: ' .. lon; end return 'no lat/lon'end

return