<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_mapframe</id>
	<title>Module:Infobox mapframe - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AInfobox_mapframe"/>
	<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Infobox_mapframe&amp;action=history"/>
	<updated>2026-04-04T20:44:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Infobox_mapframe&amp;diff=5923&amp;oldid=prev</id>
		<title>&gt;Ahecht: Detect if the default value of &quot;{{{coordinates}}}&quot; is being passed by {{Parameter names example}} and automatically turn off</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Infobox_mapframe&amp;diff=5923&amp;oldid=prev"/>
		<updated>2025-01-23T16:53:23Z</updated>

		<summary type="html">&lt;p&gt;Detect if the default value of &amp;quot;{{{coordinates}}}&amp;quot; is being passed by {{Parameter names example}} and automatically turn off&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mf = require(&amp;#039;Module:Mapframe&amp;#039;)&lt;br /&gt;
local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
local yesno = require(&amp;#039;Module:Yesno&amp;#039;)&lt;br /&gt;
local infoboxImage = require(&amp;#039;Module:InfoboxImage&amp;#039;).InfoboxImage&lt;br /&gt;
&lt;br /&gt;
-- Defaults&lt;br /&gt;
local DEFAULT_FRAME_WIDTH = &amp;quot;270&amp;quot;&lt;br /&gt;
local DEFAULT_FRAME_HEIGHT = &amp;quot;200&amp;quot;&lt;br /&gt;
local DEFAULT_ZOOM = 10&lt;br /&gt;
local DEFAULT_GEOMASK_STROKE_WIDTH = &amp;quot;1&amp;quot;&lt;br /&gt;
local DEFAULT_GEOMASK_STROKE_COLOR = &amp;quot;#777777&amp;quot;&lt;br /&gt;
local DEFAULT_GEOMASK_FILL = &amp;quot;#888888&amp;quot;&lt;br /&gt;
local DEFAULT_GEOMASK_FILL_OPACITY = &amp;quot;0.5&amp;quot;&lt;br /&gt;
local DEFAULT_SHAPE_STROKE_WIDTH = &amp;quot;3&amp;quot;&lt;br /&gt;
local DEFAULT_SHAPE_STROKE_COLOR = &amp;quot;#FF0000&amp;quot;&lt;br /&gt;
local DEFAULT_SHAPE_FILL = &amp;quot;#606060&amp;quot;&lt;br /&gt;
local DEFAULT_SHAPE_FILL_OPACITY = &amp;quot;0.5&amp;quot;&lt;br /&gt;
local DEFAULT_LINE_STROKE_WIDTH = &amp;quot;5&amp;quot;&lt;br /&gt;
local DEFAULT_LINE_STROKE_COLOR = &amp;quot;#FF0000&amp;quot;&lt;br /&gt;
local DEFAULT_MARKER_COLOR = &amp;quot;#5E74F3&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Trim whitespace from args, and remove empty args&lt;br /&gt;
function trimArgs(argsTable)&lt;br /&gt;
	local cleanArgs = {}&lt;br /&gt;
	for key, val in pairs(argsTable) do&lt;br /&gt;
		if type(val) == &amp;#039;string&amp;#039; then&lt;br /&gt;
			val = val:match(&amp;#039;^%s*(.-)%s*$&amp;#039;)&lt;br /&gt;
			if val ~= &amp;#039;&amp;#039; then&lt;br /&gt;
				cleanArgs[key] = val&lt;br /&gt;
			end&lt;br /&gt;
		else&lt;br /&gt;
			cleanArgs[key] = val&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return cleanArgs&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getBestStatement(item_id, property_id)&lt;br /&gt;
	if not(item_id) or not(mw.wikibase.isValidEntityId(item_id)) or not(mw.wikibase.entityExists(item_id)) then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local statements = mw.wikibase.getBestStatements(item_id, property_id)&lt;br /&gt;
	if not statements or #statements == 0 then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	local hasNoValue = ( statements[1].mainsnak and statements[1].mainsnak.snaktype == &amp;#039;novalue&amp;#039; )&lt;br /&gt;
	if hasNoValue then&lt;br /&gt;
		return false&lt;br /&gt;
	end&lt;br /&gt;
	return statements[1]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function hasWikidataProperty(item_id, property_id)&lt;br /&gt;
	return getBestStatement(item_id, property_id) and true or false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function getStatementValue(statement)&lt;br /&gt;
	return statement and statement.mainsnak and statement.mainsnak.datavalue and statement.mainsnak.datavalue.value or nil&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function relatedEntity(item_id, property_id)&lt;br /&gt;
	local value = getStatementValue( getBestStatement(item_id, property_id) )&lt;br /&gt;
	return value and value.id or false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function idType(id)&lt;br /&gt;
	if not id then &lt;br /&gt;
		return nil&lt;br /&gt;
	elseif mw.ustring.match(id, &amp;quot;[Pp]%d+&amp;quot;) then&lt;br /&gt;
		return &amp;quot;property&amp;quot;&lt;br /&gt;
	elseif mw.ustring.match(id, &amp;quot;[Qq]%d+&amp;quot;) then&lt;br /&gt;
		return &amp;quot;item&amp;quot;&lt;br /&gt;
	else&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function shouldAutoRun(frame)&lt;br /&gt;
	-- Check if should be running&lt;br /&gt;
	local pargs = frame.getParent(frame).args&lt;br /&gt;
	local explicitlyOn = yesno(mw.text.trim(pargs.mapframe or &amp;quot;&amp;quot;)) -- true of false or nil&lt;br /&gt;
	if pargs.coordinates == &amp;quot;&amp;amp;#123;&amp;amp;#123;&amp;amp;#123;coordinates&amp;amp;#125;&amp;amp;#125;&amp;amp;#125;&amp;quot; then explicitlyOn = false end&lt;br /&gt;
	local onByDefault = (explicitlyOn == nil) and yesno(mw.text.trim(frame.args.onByDefault or &amp;quot;&amp;quot;), false) -- true or false&lt;br /&gt;
	return explicitlyOn or onByDefault&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function argsFromAuto(frame)&lt;br /&gt;
	-- Get args from the frame (invoke call) and the parent (template call).&lt;br /&gt;
	-- Frame arguments are default values which are overridden by parent values&lt;br /&gt;
	-- when both are present&lt;br /&gt;
	local args = getArgs(frame, {parentFirst = true})&lt;br /&gt;
	&lt;br /&gt;
	-- Discard args not prefixed with &amp;quot;mapframe-&amp;quot;, remove that prefix from those that remain&lt;br /&gt;
	local fixedArgs = {}&lt;br /&gt;
	for name, val in pairs(args) do&lt;br /&gt;
		local fixedName = string.match(name, &amp;quot;^mapframe%-(.+)$&amp;quot; )&lt;br /&gt;
		if fixedName then&lt;br /&gt;
			fixedArgs[fixedName] = val&lt;br /&gt;
		-- allow coord, coordinates, etc to be unprefixed&lt;br /&gt;
		elseif name == &amp;quot;coordinates&amp;quot; or name == &amp;quot;coord&amp;quot; or name == &amp;quot;coordinate&amp;quot; and not fixedArgs.coord then&lt;br /&gt;
			fixedArgs.coord = val&lt;br /&gt;
		-- allow id, qid to be unprefixed, map to id (if not already present)&lt;br /&gt;
		elseif name == &amp;quot;id&amp;quot; or name == &amp;quot;qid&amp;quot; and not fixedArgs.id then&lt;br /&gt;
			fixedArgs.id = val&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return fixedArgs&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
p.autocaption = function(frame)&lt;br /&gt;
	if not shouldAutoRun(frame) then return &amp;quot;&amp;quot; end&lt;br /&gt;
	local args = argsFromAuto(frame)&lt;br /&gt;
	if args.caption then&lt;br /&gt;
		return args.caption&lt;br /&gt;
	elseif args.switcher then &lt;br /&gt;
		return &amp;quot;&amp;quot;&lt;br /&gt;
	end&lt;br /&gt;
	local maskItem&lt;br /&gt;
	local maskType = idType(args.geomask)&lt;br /&gt;
	if maskType == &amp;#039;item&amp;#039; then&lt;br /&gt;
		maskItem = args.geomask&lt;br /&gt;
	elseif maskType == &amp;quot;property&amp;quot; then&lt;br /&gt;
		maskItem = relatedEntity(args.id or mw.wikibase.getEntityIdForCurrentPage(), args.geomask)&lt;br /&gt;
	end&lt;br /&gt;
	local maskItemLabel = maskItem and mw.wikibase.getLabel( maskItem )&lt;br /&gt;
	return maskItemLabel and &amp;quot;Location in &amp;quot;..maskItemLabel or &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function parseCustomWikitext(customWikitext)&lt;br /&gt;
	-- infoboxImage will format an image if given wikitext containing an&lt;br /&gt;
	-- image, or else pass through the wikitext unmodified&lt;br /&gt;
	return infoboxImage({&lt;br /&gt;
		args = {&lt;br /&gt;
			image = customWikitext&lt;br /&gt;
		}&lt;br /&gt;
	})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.auto = function(frame)&lt;br /&gt;
	if not shouldAutoRun(frame) then return &amp;quot;&amp;quot; end&lt;br /&gt;
	local args = argsFromAuto(frame)&lt;br /&gt;
	if args.custom then&lt;br /&gt;
		return frame:preprocess(parseCustomWikitext(args.custom))&lt;br /&gt;
	end&lt;br /&gt;
	local mapframe = p._main(args)&lt;br /&gt;
	return frame:preprocess(mapframe)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p.main = function(frame)&lt;br /&gt;
	local parent = frame.getParent(frame)&lt;br /&gt;
	local parentArgs = parent.args&lt;br /&gt;
	local mapframe = p._main(parentArgs)&lt;br /&gt;
	return frame:preprocess(mapframe)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p._main = function(_config)&lt;br /&gt;
	-- `config` is the args passed to this module&lt;br /&gt;
	local config = trimArgs(_config)&lt;br /&gt;
	&lt;br /&gt;
	-- Require wikidata item, or specified coords&lt;br /&gt;
	local wikidataId = config.id or mw.wikibase.getEntityIdForCurrentPage()&lt;br /&gt;
	if not(wikidataId) and not(config.coord) then&lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Require coords (specified or from wikidata), so that map will be centred somewhere&lt;br /&gt;
	-- (P625 = coordinate location)&lt;br /&gt;
	local hasCoordinates = hasWikidataProperty(wikidataId, &amp;#039;P625&amp;#039;) or config.coordinates or config.coord&lt;br /&gt;
	if not hasCoordinates then  &lt;br /&gt;
		return &amp;#039;&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- `args` is the arguments which will be passed to the mapframe module&lt;br /&gt;
	local args = {}&lt;br /&gt;
&lt;br /&gt;
	-- Some defaults/overrides for infobox presentation&lt;br /&gt;
	args.display = &amp;quot;inline&amp;quot;&lt;br /&gt;
	args.frame = &amp;quot;yes&amp;quot;&lt;br /&gt;
	args.plain = &amp;quot;yes&amp;quot;&lt;br /&gt;
	args[&amp;quot;frame-width&amp;quot;]  = config[&amp;quot;frame-width&amp;quot;] or config.width or DEFAULT_FRAME_WIDTH&lt;br /&gt;
	args[&amp;quot;frame-height&amp;quot;] = config[&amp;quot;frame-height&amp;quot;] or config.height or DEFAULT_FRAME_HEIGHT&lt;br /&gt;
	args[&amp;quot;frame-align&amp;quot;]  = &amp;quot;center&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	args[&amp;quot;frame-coord&amp;quot;] = config[&amp;quot;frame-coordinates&amp;quot;] or config[&amp;quot;frame-coord&amp;quot;] or &amp;quot;&amp;quot;&lt;br /&gt;
	-- Note: config[&amp;quot;coordinates&amp;quot;] or config[&amp;quot;coord&amp;quot;] should not be used for the alignment of the frame;&lt;br /&gt;
	-- see talk page ( https://en.wikipedia.org/wiki/Special:Diff/876492931 )&lt;br /&gt;
&lt;br /&gt;
	-- deprecated lat and long parameters&lt;br /&gt;
	args[&amp;quot;frame-lat&amp;quot;]    = config[&amp;quot;frame-lat&amp;quot;] or config[&amp;quot;frame-latitude&amp;quot;] or &amp;quot;&amp;quot;&lt;br /&gt;
	args[&amp;quot;frame-long&amp;quot;]   = config[&amp;quot;frame-long&amp;quot;] or config[&amp;quot;frame-longitude&amp;quot;] or &amp;quot;&amp;quot;&lt;br /&gt;
&lt;br /&gt;
    -- if zoom isn&amp;#039;t specified from config:&lt;br /&gt;
    local zoom = config.zoom&lt;br /&gt;
    if not zoom then&lt;br /&gt;
	    -- Calculate zoom from length or area (converted to km or km2)&lt;br /&gt;
	    -- Zoom so that length or area is completely included in mapframe&lt;br /&gt;
	    local getZoom = require(&amp;#039;Module:Infobox dim&amp;#039;)._zoom&lt;br /&gt;
	    zoom = getZoom({length_km=config.length_km, length_mi=config.length_mi,&lt;br /&gt;
                        width_km=config.width_km, width_mi=config.width_mi,&lt;br /&gt;
		                area_km2=config.area_km2, area_mi2=config.area_mi2,&lt;br /&gt;
                        area_ha=config.area_ha, area_acre=config.area_acre,&lt;br /&gt;
                        type=config.type, population=config.population,&lt;br /&gt;
		                viewport_px=math.min(args[&amp;quot;frame-width&amp;quot;],args[&amp;quot;frame-height&amp;quot;])})&lt;br /&gt;
    end&lt;br /&gt;
    args.zoom = zoom or DEFAULT_ZOOM&lt;br /&gt;
&lt;br /&gt;
	-- Conditionals: whether point, geomask should be shown&lt;br /&gt;
	local hasOsmRelationId = hasWikidataProperty(wikidataId, &amp;#039;P402&amp;#039;) -- P402 is OSM relation ID&lt;br /&gt;
	local shouldShowPointMarker;&lt;br /&gt;
	if config.point == &amp;quot;on&amp;quot; then&lt;br /&gt;
		shouldShowPointMarker = true &lt;br /&gt;
	elseif config.point == &amp;quot;none&amp;quot; then&lt;br /&gt;
		shouldShowPointMarker = false&lt;br /&gt;
	else&lt;br /&gt;
		shouldShowPointMarker = not(hasOsmRelationId) or (config.marker and config.marker ~= &amp;#039;none&amp;#039;) or (config.coordinates or config.coord)&lt;br /&gt;
	end&lt;br /&gt;
	local shouldShowShape = config.shape ~= &amp;#039;none&amp;#039;&lt;br /&gt;
	local shapeType = config.shape == &amp;#039;inverse&amp;#039; and &amp;#039;shape-inverse&amp;#039; or &amp;#039;shape&amp;#039;&lt;br /&gt;
	local shouldShowLine = config.line ~= &amp;#039;none&amp;#039;&lt;br /&gt;
	local maskItem&lt;br /&gt;
	local useWikidata = wikidataId and true or false -- Use shapes/lines based on wikidata id, if there is one&lt;br /&gt;
	-- But do not use wikidata when local coords are specified (and not turned off), unless explicitly set&lt;br /&gt;
	if useWikidata and config.coord and shouldShowPointMarker then&lt;br /&gt;
		useWikidata = config.wikidata and true or false&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Switcher&lt;br /&gt;
	if config.switcher == &amp;quot;zooms&amp;quot; then&lt;br /&gt;
		-- switching between zoom levels&lt;br /&gt;
		local maxZoom = math.max(tonumber(args.zoom), 3) -- what zoom would have otherwise been (if 3 or more, otherwise 3)&lt;br /&gt;
		local minZoom = 1 -- completely zoomed out&lt;br /&gt;
		local midZoom = math.floor((maxZoom + minZoom)/2) -- midway between maxn and min&lt;br /&gt;
		args.switch = &amp;quot;zoomed in, zoomed midway, zoomed out&amp;quot;&lt;br /&gt;
		args.zoom = string.format(&amp;quot;SWITCH:%d,%d,%d&amp;quot;, maxZoom, midZoom, minZoom)&lt;br /&gt;
	elseif config.switcher == &amp;quot;auto&amp;quot; then&lt;br /&gt;
		-- switching between P276 and P131 areas with recursive lookup, e.g. item&amp;#039;s city,&lt;br /&gt;
		-- that city&amp;#039;s state, and that state&amp;#039;s country&lt;br /&gt;
		args.zoom = nil -- let kartographer determine the zoom&lt;br /&gt;
		local maskLabels = {}&lt;br /&gt;
		local maskItems = {}&lt;br /&gt;
		local maskItemId = relatedEntity(wikidataId, &amp;quot;P276&amp;quot;) or  relatedEntity(wikidataId, &amp;quot;P131&amp;quot;) &lt;br /&gt;
		local maskLabel = mw.wikibase.getLabel(maskItemId)&lt;br /&gt;
		while maskItemId and maskLabel and mw.text.trim(maskLabel) ~= &amp;quot;&amp;quot; do&lt;br /&gt;
			table.insert(maskLabels, maskLabel)&lt;br /&gt;
			table.insert(maskItems, maskItemId)&lt;br /&gt;
			maskItemId = maskItemId and relatedEntity(maskItemId, &amp;quot;P131&amp;quot;)&lt;br /&gt;
			maskLabel = maskItemId and mw.wikibase.getLabel(maskItemId)&lt;br /&gt;
		end&lt;br /&gt;
		if #maskLabels &amp;gt; 1 then&lt;br /&gt;
			args.switch = table.concat(maskLabels, &amp;quot;###&amp;quot;)&lt;br /&gt;
			maskItem = &amp;quot;SWITCH:&amp;quot; .. table.concat(maskItems, &amp;quot;,&amp;quot;)&lt;br /&gt;
		elseif #maskLabels == 1 then&lt;br /&gt;
			maskItem = maskItemId[1]&lt;br /&gt;
		end&lt;br /&gt;
	elseif config.switcher == &amp;quot;geomasks&amp;quot; and config.geomask then&lt;br /&gt;
		-- switching between items in geomask parameter&lt;br /&gt;
		args.zoom = nil -- let kartographer determine the zoom&lt;br /&gt;
		local separator = (mw.ustring.find(config.geomask, &amp;quot;###&amp;quot;, 0, true ) and &amp;quot;###&amp;quot;) or&lt;br /&gt;
			(mw.ustring.find(config.geomask, &amp;quot;;&amp;quot;, 0, true ) and &amp;quot;;&amp;quot;) or &amp;quot;,&amp;quot;&lt;br /&gt;
		local pattern = &amp;quot;%s*&amp;quot;..separator..&amp;quot;%s*&amp;quot;&lt;br /&gt;
		local maskItems = mw.text.split(mw.ustring.gsub(config.geomask, &amp;quot;SWITCH:&amp;quot;, &amp;quot;&amp;quot;), pattern)&lt;br /&gt;
		local maskLabels = {}&lt;br /&gt;
		if #maskItems &amp;gt; 1 then&lt;br /&gt;
			for i, item in ipairs(maskItems) do&lt;br /&gt;
				table.insert(maskLabels, mw.wikibase.getLabel(item))&lt;br /&gt;
			end&lt;br /&gt;
			args.switch = table.concat(maskLabels, &amp;quot;###&amp;quot;)&lt;br /&gt;
			maskItem = &amp;quot;SWITCH:&amp;quot; .. table.concat(maskItems, &amp;quot;,&amp;quot;)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- resolve geomask item id (if not using geomask switcher)&lt;br /&gt;
	if not maskItem then --  &lt;br /&gt;
		local maskType = idType(config.geomask)&lt;br /&gt;
		if maskType == &amp;#039;item&amp;#039; then&lt;br /&gt;
			maskItem = config.geomask&lt;br /&gt;
		elseif maskType == &amp;quot;property&amp;quot; then&lt;br /&gt;
			maskItem = relatedEntity(wikidataId, config.geomask)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Keep track of arg numbering&lt;br /&gt;
	local argNumber = &amp;#039;&amp;#039;&lt;br /&gt;
	local function incrementArgNumber()&lt;br /&gt;
		if argNumber == &amp;#039;&amp;#039; then&lt;br /&gt;
			argNumber = 2&lt;br /&gt;
		else&lt;br /&gt;
			argNumber = argNumber + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Geomask&lt;br /&gt;
	if maskItem then&lt;br /&gt;
		args[&amp;quot;type&amp;quot;..argNumber] = &amp;quot;shape-inverse&amp;quot;&lt;br /&gt;
		args[&amp;quot;id&amp;quot;..argNumber] = maskItem&lt;br /&gt;
		args[&amp;quot;stroke-width&amp;quot;..argNumber] = config[&amp;quot;geomask-stroke-width&amp;quot;] or DEFAULT_GEOMASK_STROKE_WIDTH&lt;br /&gt;
		args[&amp;quot;stroke-color&amp;quot;..argNumber] = config[&amp;quot;geomask-stroke-color&amp;quot;] or config[&amp;quot;geomask-stroke-colour&amp;quot;] or DEFAULT_GEOMASK_STROKE_COLOR&lt;br /&gt;
		args[&amp;quot;fill&amp;quot;..argNumber] = config[&amp;quot;geomask-fill&amp;quot;] or DEFAULT_GEOMASK_FILL&lt;br /&gt;
		args[&amp;quot;fill-opacity&amp;quot;..argNumber] = config[&amp;quot;geomask-fill-opacity&amp;quot;] or DEFAULT_SHAPE_FILL_OPACITY&lt;br /&gt;
		-- Let kartographer determine zoom and position, unless it is explicitly set in config&lt;br /&gt;
		if not config.zoom and not config.switcher then&lt;br /&gt;
			args.zoom = nil&lt;br /&gt;
			args[&amp;quot;frame-coord&amp;quot;] = nil&lt;br /&gt;
			args[&amp;quot;frame-lat&amp;quot;] = nil&lt;br /&gt;
			args[&amp;quot;frame-long&amp;quot;] = nil 	&lt;br /&gt;
			local maskArea = getStatementValue( getBestStatement(maskItem, &amp;#039;P2046&amp;#039;) )&lt;br /&gt;
		end&lt;br /&gt;
		incrementArgNumber()&lt;br /&gt;
		-- Hack to fix phab:T255932&lt;br /&gt;
		if not args.zoom then&lt;br /&gt;
			args[&amp;quot;type&amp;quot;..argNumber] = &amp;quot;line&amp;quot;&lt;br /&gt;
			args[&amp;quot;id&amp;quot;..argNumber] = maskItem&lt;br /&gt;
			args[&amp;quot;stroke-width&amp;quot;..argNumber] = 0&lt;br /&gt;
			incrementArgNumber()&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Shape (or shape-inverse)&lt;br /&gt;
	if useWikidata and shouldShowShape then&lt;br /&gt;
		args[&amp;quot;type&amp;quot;..argNumber] = shapeType&lt;br /&gt;
		if config.id then args[&amp;quot;id&amp;quot;..argNumber] = config.id end&lt;br /&gt;
		args[&amp;quot;stroke-width&amp;quot;..argNumber] = config[&amp;quot;shape-stroke-width&amp;quot;] or config[&amp;quot;stroke-width&amp;quot;] or DEFAULT_SHAPE_STROKE_WIDTH&lt;br /&gt;
		args[&amp;quot;stroke-color&amp;quot;..argNumber] = config[&amp;quot;shape-stroke-color&amp;quot;] or config[&amp;quot;shape-stroke-colour&amp;quot;] or config[&amp;quot;stroke-color&amp;quot;] or config[&amp;quot;stroke-colour&amp;quot;] or DEFAULT_SHAPE_STROKE_COLOR&lt;br /&gt;
		args[&amp;quot;fill&amp;quot;..argNumber] = config[&amp;quot;shape-fill&amp;quot;] or DEFAULT_SHAPE_FILL&lt;br /&gt;
		args[&amp;quot;fill-opacity&amp;quot;..argNumber] = config[&amp;quot;shape-fill-opacity&amp;quot;] or DEFAULT_SHAPE_FILL_OPACITY&lt;br /&gt;
		incrementArgNumber()&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Line&lt;br /&gt;
	if useWikidata and shouldShowLine then&lt;br /&gt;
		args[&amp;quot;type&amp;quot;..argNumber] = &amp;quot;line&amp;quot;&lt;br /&gt;
		if config.id then args[&amp;quot;id&amp;quot;..argNumber] = config.id end&lt;br /&gt;
		args[&amp;quot;stroke-width&amp;quot;..argNumber] = config[&amp;quot;line-stroke-width&amp;quot;] or config[&amp;quot;stroke-width&amp;quot;] or DEFAULT_LINE_STROKE_WIDTH&lt;br /&gt;
		args[&amp;quot;stroke-color&amp;quot;..argNumber] = config[&amp;quot;line-stroke-color&amp;quot;] or config[&amp;quot;line-stroke-colour&amp;quot;] or config[&amp;quot;stroke-color&amp;quot;] or config[&amp;quot;stroke-colour&amp;quot;] or DEFAULT_LINE_STROKE_COLOR&lt;br /&gt;
		incrementArgNumber()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	-- Point&lt;br /&gt;
	if shouldShowPointMarker then&lt;br /&gt;
		args[&amp;quot;type&amp;quot;..argNumber] = &amp;quot;point&amp;quot;&lt;br /&gt;
		if config.id then args[&amp;quot;id&amp;quot;..argNumber] = config.id end&lt;br /&gt;
		if config.coord then args[&amp;quot;coord&amp;quot;..argNumber] = config.coord end&lt;br /&gt;
		if config.marker then args[&amp;quot;marker&amp;quot;..argNumber] = config.marker end&lt;br /&gt;
		args[&amp;quot;marker-color&amp;quot;..argNumber] = config[&amp;quot;marker-color&amp;quot;] or config[&amp;quot;marker-colour&amp;quot;] or DEFAULT_MARKER_COLOR&lt;br /&gt;
		incrementArgNumber()&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	local mapframe = args.switch and mf.multi(args) or mf._main(args)&lt;br /&gt;
	local tracking = hasOsmRelationId and &amp;#039;&amp;#039; or &amp;#039;[[Category:Infobox mapframe without OSM relation ID on Wikidata]]&amp;#039;&lt;br /&gt;
	return mapframe .. tracking&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>&gt;Ahecht</name></author>
	</entry>
</feed>