Module:Location map: Difference between revisions
Implementing talk page edit requested
m (1 revision imported) |
(Implementing talk page edit requested) |
||
Line 28: | Line 28: | ||
else | else | ||
return mapData[name] | return mapData[name] | ||
end | end | ||
end | end | ||
else | else | ||
error('Unable to find the specified location map definition | error('Unable to find the specified location map definition: "Module:Location map/data/' .. map .. '" does not exist', 2) | ||
end | end | ||
end | end | ||
Line 400: | Line 383: | ||
end | end | ||
local builder = mw.html.create() | |||
if args.coordinates then | if args.coordinates then | ||
-- Temporarily removed to facilitate infobox conversion. See [[Wikipedia:Coordinates in infoboxes]] | -- Temporarily removed to facilitate infobox conversion. See [[Wikipedia:Coordinates in infoboxes]] | ||
Line 414: | Line 398: | ||
local value = entity.claims.P625[1].mainsnak.datavalue.value | local value = entity.claims.P625[1].mainsnak.datavalue.value | ||
longitude, latitude = value.longitude, value.latitude | longitude, latitude = value.longitude, value.latitude | ||
end | |||
if args.link then | |||
builder:wikitext('[[Category:Location maps with linked markers with coordinates from Wikidata]]') | |||
end | end | ||
end | end | ||
Line 421: | Line 408: | ||
error('No value was provided for latitude') | error('No value was provided for latitude') | ||
end | end | ||
if (not args.lon_deg) ~= (not args.lat_deg) then | if (not args.lon_deg) ~= (not args.lat_deg) then | ||
builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Degrees]]') | builder:wikitext('[[Category:Location maps with different longitude and latitude precisions|Degrees]]') |