Jump to content
Wikipedia The Free Encyclopedia

Module:Infobox mapframe

From Wikipedia, the free encyclopedia
Module documentation[view] [edit] [history] [purge]
This module is rated as ready for general use. It has reached a mature state, is considered relatively stable and bug-free, and may be used wherever appropriate. It can be mentioned on help pages and other Wikipedia resources as an option for new users. To minimise server load and avoid disruptive output, improvements should be developed through sandbox testing rather than repeated trial-and-error editing.
Page template-protected This module is currently protected from editing.
See the protection policy and protection log for more details. Please discuss any changes on the talk page; you may submit an edit request to ask an administrator to make an edit if it is uncontroversial or supported by consensus. You may also request that this page be unprotected.
Warning This Lua module is used on approximately 1,190,000 pages, or roughly 2% of all pages .
To avoid major disruption and server load, any changes should be tested in the module's /sandbox or /testcases subpages, or in your own module sandbox. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them.
Related pages

This module implements {{Infobox mapframe }}.

See Template:Infobox mapframe/testcases for tests.

Usage

Module that automatically makes a mapframe suitable for an infobox automatically, with minimal user input.

Generic usage

Just use the template {{Infobox mapframe }}, following the documentation there. This module may also be imported to another Lua module.

Automatic maps in infoboxes

Example edits: Template:Infobox prison, Template:Infobox prison/doc

Edit the infobox template (or its sandbox). Add lines like the following examples to the infobox. Replace numbers (4, or 97 to 99), with the appropriate number based on how many other image or data parameters are already present.

If placing near the top of infobox If placing at/near the bottom of the infobox
| image4 = {{#invoke:Infobox mapframe|auto}}
| caption4 = {{#invoke:Infobox mapframe|autocaption}}
| header97 = {{#if:{{{mapframe|}}}|Location}}
| data98 = {{#invoke:Infobox mapframe|auto}}
| data99 = {{#invoke:Infobox mapframe|autocaption}}

If the template has a call to {{#invoke:Check for unknown parameters|check}}, simply add |mapframe_args=y to the call and the various mapframe args will automatically be included.

Once this is done, the above parameters will be available to users of the template.

  • Defaults values for these parameters can also be specified in the #invoke calls above, e.g.
{{#invoke:Infobox mapframe
 | auto
 | mapframe-marker = library
}}
means that the library marker will be used, unless a different value is passed in to the template.
  • The maps are off by default, which means maps will not be displayed unless |mapframe=yes is present in the template call.
    To turn maps on by default, in the #invoke calls above add |onByDefault=yes – which means maps will be displayed unless |mapframe=no is present in the template call.
    onByDefault can also be set to a conditional, such as if another parameters is present, e.g. |onByDefault={{#if:{{{pushpin_map|}}}|no|yes}}
    Both the auto and autocaption functions take the onByDefault value into account.
  • Add the new parameters to the template documentation.
    You can use {{Infobox mapframe/doc/parameters}}.
    If any default values are modified in the #invoke calls, add them as parameters in the form |parameter-name=value.
    The default output is shown here collapsed:
Extended content
  • Basic parameters:
    • mapframe – Specify yes or no to show or hide the map, overriding the default. Default: no
      • Internal onByDefault parameter: not specified
    • mapframe-caption – Caption for the map. Default: blank (or if |mapframe-geomask= is set, "Location in geomask's label")
    • mapframe-custom – Use a custom map instead of the automatic mapframe. Specify either a {{maplink}} template, or another template that generates a mapframe map, or an image name. If used, the subsequent mapframe parameters will be ignored. Default: not specified
    • mapframe-id or id or qid – Id (Q-number) of Wikidata item to use. Default: item for current page
    • mapframe-coordinates or mapframe-coord or coordinates or coord – Coordinates to use, instead of any on Wikidata. Use the {{Coord }} template, e.g. |coord={{Coord|12.34|N|56.78|E}}. Default: coordinates from Wikidata d:Property:P625
    • mapframe-wikidata – Set to yes to show shape/line features from the wikidata item, if any, when |coord= is set. Default: not specified
  • Customise which features are displayed:
    • mapframe-point – Turn off display of point feature by setting to none. Force point marker to be displayed by setting to on. Default: not specified
    • mapframe-shape – Turn off display of shape feature by setting to none. Force display of shape by setting to on. Use an inverse shape (geomask) instead of a regular shape by setting to inverse. Default: not specified
    • mapframe-line – Turn off display of line feature by setting to none. Force display of line by setting to on. Default: not specified
    • mapframe-geomask – Wikidata item to use as a geomask (everything outside the boundary is shaded darker). Can either be a specific Wikidata item (Q-number), or a property that specifies the item to use (e.g. P17 for country (P17), P131 for located in the administrative territorial entity (P131)). Default: not specified
    • mapframe-switcher – set to auto or geomasks or zooms to enable Template:Switcher-style switching between multiple mapframes. Default: not specified
      • auto – switch geomasks found in location (P276) and located in the administrative territorial entity (P131) statements on the page's Wikidata item, searching recursively. E.g. an item's city, that city's state, and that state's country.
      • geomasks – switch between the geomasks specified as a comma-separated list of Wikidata items (Q-numbers) in the mapframe-geomask parameter
      • zooms – switch between "zoomed in"/"zoomed midway"/"zoomed out", where "zoomed in" is the default zoom (with a minimum of 3), "zoomed out" is 1, and "zoomed midway" is the average
  • Other optional parameters:
    • mapframe-frame-width or mapframe-width – Frame width. Default: 270
    • mapframe-frame-height or mapframe-height – Frame height. Default: 200
    • mapframe-shape-fill – Color used to fill shape features. Default: #606060
    • mapframe-shape-fill-opacity – Opacity level of shape fill, a number between 0 and 1. Default: 0.1
    • mapframe-stroke-color or mapframe-stroke-colour – Color of line features, and outlines of shape features. Default: #ff0000
      • mapframe-line-stroke-color or mapframe-line-stroke-colour – Color of line features. Default: #ff0000
      • mapframe-shape-stroke-color or mapframe-shape-stroke-colour – Color of outlines of shape features. Default: #ff0000
    • mapframe-stroke-width – Width of line features, and outlines of shape features. Default: 2
      • mapframe-shape-stroke-width – Width of outlines of shape features. Default: 2
      • mapframe-line-stroke-width – Width of line features. Default: 5
    • mapframe-marker – Marker symbol to use for coordinates; see mw:Help:Extension:Kartographer/Icons for options. Default: not specified (i.e. blank)
      • Can also be set to blank to override any default marker symbol
    • mapframe-marker-color or mapframe-marker-colour – Background color for the marker. Default: #5E74F3
    • mapframe-geomask-stroke-color or mapframe-geomask-stroke-colour – Color of outline of geomask shape. Default: #555555
    • mapframe-geomask-stroke-width – Width of outline of geomask shape. Default: 1
    • mapframe-geomask-fill – Color used to fill outside geomask features. Default: #606060
    • mapframe-geomask-fill-opacity – Opacity level of fill outside geomask features, a number between 0 and 1. Default: 0.25
    • mapframe-zoom – Set the zoom level, from "1" (map of earth) to "18" (maximum zoom in), to be used if the zoom level cannot be determined automatically from object length or area. Default: 10
    • mapframe-length_km or mapframe-length_mi or mapframe-area_km2 or mapframe-area_mi2 – Determine zoom level by passing in object's length (in kilometres or miles) or area (in square kilometres or square miles). Default: not specified / not specified / not specified / not specified
    • mapframe-frame-coordinates or mapframe-frame-coord – Alternate latitude and longitude coordinates for initial placement of map, using {{coord }}. Default: derived from item coordinates
    • mapframe-type – Set the type of the object, with the same usage as {{coord }}. Default: not specified
    • mapframe-population – Set the population, useful with type="city", for {{Infobox dim }}. Default: not specified

See also

The above documentation is transcluded from Module:Infobox mapframe/doc. (edit | history)
Editors can experiment in this module's sandbox (edit | diff) and testcases (create) pages.
Subpages of this module.

 localmf=require('Module:Mapframe')
 localgetArgs=require('Module:Arguments').getArgs
 localyesno=require('Module:Yesno')
 localinfoboxImage=require('Module:InfoboxImage').InfoboxImage

 -- Defaults
 localDEFAULT_FRAME_WIDTH="270"
 localDEFAULT_FRAME_HEIGHT="200"
 localDEFAULT_ZOOM=10
 localDEFAULT_GEOMASK_STROKE_WIDTH="1"
 localDEFAULT_GEOMASK_STROKE_COLOR="#777777"
 localDEFAULT_GEOMASK_FILL="#888888"
 localDEFAULT_GEOMASK_FILL_OPACITY="0.25"
 localDEFAULT_SHAPE_STROKE_WIDTH="2"
 localDEFAULT_SHAPE_STROKE_COLOR="#FF0000"
 localDEFAULT_SHAPE_FILL="#606060"
 localDEFAULT_SHAPE_FILL_OPACITY="0.1"
 localDEFAULT_LINE_STROKE_WIDTH="5"
 localDEFAULT_LINE_STROKE_COLOR="#FF0000"
 localDEFAULT_MARKER_COLOR="#5E74F3"

 localutil={}

 functionutil.noop(info)
 localDEFAULT_NOOP_OUTPUT=""

 -- uncomment this when debugging
 -- DEFAULT_NOOP_OUTPUT = "debug: mapframe no-op: " .. info
 -- mw.log(DEFAULT_NOOP_OUTPUT)

 returnDEFAULT_NOOP_OUTPUT
 end

 -- Trim whitespace from args, and remove empty args
 functionutil.trimArgs(argsTable)
 localcleanArgs={}
 forkey,valinpairs(argsTable)do
 iftype(val)=='string'then
 val=val:match('^%s*(.-)%s*$')
 ifval~=''then
 cleanArgs[key]=val
 end
 else
 cleanArgs[key]=val
 end
 end
 returncleanArgs
 end

 functionutil.getBestStatement(item_id,property_id)
 ifnot(item_id)ornot(mw.wikibase.isValidEntityId(item_id))ornot(mw.wikibase.entityExists(item_id))then
 returnfalse
 end
 localstatements=mw.wikibase.getBestStatements(item_id,property_id)
 ifnotstatementsor#statements==0then
 returnfalse
 end
 localhasNoValue=(statements[1].mainsnakandstatements[1].mainsnak.snaktype=='novalue')
 ifhasNoValuethen
 returnfalse
 end
 returnstatements[1]
 end

 functionutil.hasWikidataProperty(item_id,property_id)
 returnutil.getBestStatement(item_id,property_id)andtrueorfalse
 end

 functionutil.getStatementValue(statement)
 returnstatementandstatement.mainsnakandstatement.mainsnak.datavalueandstatement.mainsnak.datavalue.valueornil
 end

 functionutil.relatedEntity(item_id,property_id)
 localvalue=util.getStatementValue(util.getBestStatement(item_id,property_id))
 returnvalueandvalue.idorfalse
 end

 functionutil.idType(id)
 ifnotidthen
 returnnil
 elseifmw.ustring.match(id,"[Pp]%d+")then
 return"property"
 elseifmw.ustring.match(id,"[Qq]%d+")then
 return"item"
 else
 returnnil
 end
 end

 functionutil.shouldAutoRun(frame)
 -- Check if should be running
 localpargs=frame.getParent(frame).args
 localexplicitlyOn=yesno(mw.text.trim(pargs.mapframeor""))-- true of false or nil
 ifpargs.coordinates=="{{{coordinates}}}"thenexplicitlyOn=falseend
 localonByDefault=(explicitlyOn==nil)andyesno(mw.text.trim(frame.args.onByDefaultor""),false)-- true or false
 returnexplicitlyOnoronByDefault
 end

 functionutil.argsFromAuto(frame)
 -- Get args from the frame (invoke call) and the parent (template call).
 -- Frame arguments are default values which are overridden by parent values
 -- when both are present
 localargs=getArgs(frame,{parentFirst=true})

 -- Discard args not prefixed with "mapframe-", remove that prefix from those that remain
 localfixedArgs={}
 forname,valinpairs(args)do
 localfixedName=string.match(name,"^mapframe%-(.+)$")
 iffixedNamethen
 fixedArgs[fixedName]=val
 -- allow coord, coordinates, etc to be unprefixed
 elseifname=="coordinates"orname=="coord"orname=="coordinate"andnotfixedArgs.coordthen
 fixedArgs.coord=val
 -- allow id, qid to be unprefixed, map to id (if not already present)
 elseifname=="id"orname=="qid"andnotfixedArgs.idthen
 fixedArgs.id=val
 end
 end
 returnfixedArgs
 end

 localp={}

 p.autocaption=function(frame)
 ifnotutil.shouldAutoRun(frame)then
 returnutil.noop("autocaption should not autorun")
 end
 localargs=util.argsFromAuto(frame)
 ifargs.captionthen
 returnargs.caption
 elseifargs.switcherthen
 returnutil.noop("no caption or switcher")
 end
 localmaskItem
 localmaskType=util.idType(args.geomask)
 ifmaskType=='item'then
 maskItem=args.geomask
 elseifmaskType=="property"then
 maskItem=util.relatedEntity(args.idormw.wikibase.getEntityIdForCurrentPage(),args.geomask)
 end
 localmaskItemLabel=maskItemandmw.wikibase.getLabel(maskItem)
 returnmaskItemLabel
 and"Location in "..maskItemLabel
 orutil.noop("missing maskItemLabel with type "..(maskTypeor"nil").." and item "..(maskItemor"nil"))
 end

 functionutil.parseCustomWikitext(customWikitext)
 -- infoboxImage will format an image if given wikitext containing an
 -- image, or else pass through the wikitext unmodified
 returninfoboxImage({
 args={
 image=customWikitext
 }
 })
 end

 p.auto=function(frame)
 ifnotutil.shouldAutoRun(frame)then
 returnutil.noop("auto should not autorun")
 end
 localargs=util.argsFromAuto(frame)
 ifargs.customthen
 returnframe:preprocess(util.parseCustomWikitext(args.custom))
 end
 localmapframe=p._main(args)
 returnframe:preprocess(mapframe)
 end

 p.main=function(frame)
 localparent=frame.getParent(frame)
 localparentArgs=parent.args
 localmapframe=p._main(parentArgs)
 returnframe:preprocess(mapframe)
 end

 --A list of types for objects that are too small to allow Kartographer to take over zoom
 localtinyType={
 landmark=true,
 railwaystation=true,
 edu=true,
 pass=true,
 camera=true
 }

 p._main=function(_config)
 -- `config` is the args passed to this module
 localconfig=util.trimArgs(_config)

 -- allow alias for config.coord
 config.coord=config.coordorconfig.coordinates

 -- Require wikidata item, or specified coords
 localwikidataId=config.idormw.wikibase.getEntityIdForCurrentPage()
 ifnot(wikidataId)andnot(config.coord)then
 return''
 end

 -- Require coords (specified or from wikidata), so that map will be centred somewhere
 -- (P625 = coordinate location)
 localhasCoordinates=util.hasWikidataProperty(wikidataId,'P625')orconfig.coord
 ifnothasCoordinatesthen
 return''
 end

 -- `args` is the arguments which will be passed to the mapframe module
 localargs={}

 -- Some defaults/overrides for infobox presentation
 args.display="inline"
 args.frame="yes"
 args.plain="yes"
 args["frame-width"]=config["frame-width"]orconfig.widthorDEFAULT_FRAME_WIDTH
 args["frame-height"]=config["frame-height"]orconfig.heightorDEFAULT_FRAME_HEIGHT
 args["frame-align"]="center"

 args["frame-coord"]=config["frame-coordinates"]orconfig["frame-coord"]or""
 -- Note: config["coordinates"] or config["coord"] should not be used for the alignment of the frame;
 -- see talk page ( https://en.wikipedia.org/wiki/Special:Diff/876492931 )

 -- deprecated lat and long parameters
 args["frame-lat"]=config["frame-lat"]orconfig["frame-latitude"]or""
 args["frame-long"]=config["frame-long"]orconfig["frame-longitude"]or""

 -- if zoom isn't specified from config:
 localzoom=config.zoom
 ifnotzoomthen
 -- Calculate zoom from length or area (converted to km or km2)
 -- Zoom so that length or area is completely included in mapframe
 localgetZoom=require('Module:Infobox dim')._zoom
 zoom=getZoom({length_km=config.length_km,length_mi=config.length_mi,
 width_km=config.width_km,width_mi=config.width_mi,
 area_km2=config.area_km2,area_mi2=config.area_mi2,
 area_ha=config.area_ha,area_acre=config.area_acre,
 type=config.type,population=config.population,
 viewport_px=math.min(args["frame-width"],args["frame-height"])})
 end
 args.zoom=zoomorDEFAULT_ZOOM

 -- Use OSM relation ID if available; otherwise use geoshape if that is available
 -- (geoshape is required for defunct entities, which are outside OSM's scope)
 localhasOsmRelationId=util.hasWikidataProperty(wikidataId,'P402')-- P402 is OSM relation ID
 localhasGeoshape=util.hasWikidataProperty(wikidataId,'P3896')-- P3896 is geoshape
 localwikidataProvidesGeo=hasOsmRelationIdorhasGeoshape
 localshouldShowPointMarker;

 -- determine marker argument value, determine whether to show marker
 localpointValue=config.point
 ifpointValue=='none'then
 pointValue='no'
 end
 pointValue=yesno(pointValue,'other')
 localmarkerValue=config.marker
 ifmarkerValue=='none'then
 markerValue='no'
 end
 markerValue=yesno(markerValue,true)

 ifpointValue==truethen
 shouldShowPointMarker=true
 elseifpointValue==falsethen
 shouldShowPointMarker=false
 else
 shouldShowPointMarker=not(wikidataProvidesGeo)ormarkerValueorconfig.coord
 end

 -- determine shape parameter value, determine whether to show or suppress shape
 -- also determine whether to invert shape
 localshapeValue=config.shape
 ifshapeValue=='none'then
 shapeValue='no'
 end
 shapeValue=yesno(shapeValue,'other')

 localforceShape=shapeValue==trueandwikidataProvidesGeo
 localsuppressShape=shapeValue==false
 localshapeType=config.shape=='inverse'and'shape-inverse'or'shape'

 -- determine line parameter value, determine whether to show or suppress line
 locallineValue=config.line
 iflineValue=='none'then
 lineValue='no'
 end
 locallineValue=yesno(lineValue,'other')

 localforceLine=lineValue==trueandwikidataProvidesGeo
 localsuppressLine=lineValue==false

 -- determine whether to use wikidata (independent of shape/line)
 localmaskItem
 localuseWikidata=wikidataId-- by default, if wikidata is supplied, use wikidata
 -- But do not use wikidata when local coords are specified (and not turned off), unless explicitly set
 ifuseWikidataandconfig.coordandshouldShowPointMarkerthen
 useWikidata=yesno(config.wikidata,true)
 end

 -- Switcher
 ifconfig.switcher=="zooms"then
 -- switching between zoom levels
 localmaxZoom=math.max(tonumber(args.zoom),3)-- what zoom would have otherwise been (if 3 or more, otherwise 3)
 localminZoom=1-- completely zoomed out
 localmidZoom=math.floor((maxZoom+minZoom)/2)-- midway between maxn and min
 args.switch="zoomed in, zoomed midway, zoomed out"
 args.zoom=string.format("SWITCH:%d,%d,%d",maxZoom,midZoom,minZoom)
 elseifconfig.switcher=="auto"then
 -- switching between P276 and P131 areas with recursive lookup, e.g. item's city,
 -- that city's state, and that state's country
 args.zoom=nil-- let kartographer determine the zoom
 localmaskLabels={}
 localmaskItems={}
 localmaskItemId=util.relatedEntity(wikidataId,"P276")orutil.relatedEntity(wikidataId,"P131")
 localmaskLabel=mw.wikibase.getLabel(maskItemId)
 whilemaskItemIdandmaskLabelandmw.text.trim(maskLabel)~=""do
 table.insert(maskLabels,maskLabel)
 table.insert(maskItems,maskItemId)
 maskItemId=maskItemIdandutil.relatedEntity(maskItemId,"P131")
 maskLabel=maskItemIdandmw.wikibase.getLabel(maskItemId)
 end
 if#maskLabels>1then
 args.switch=table.concat(maskLabels,"###")
 maskItem="SWITCH:"..table.concat(maskItems,",")
 elseif#maskLabels==1then
 maskItem=maskItemId[1]
 end
 elseifconfig.switcher=="geomasks"andconfig.geomaskthen
 -- switching between items in geomask parameter
 args.zoom=nil-- let kartographer determine the zoom
 localseparator=(mw.ustring.find(config.geomask,"###",0,true)and"###")or
 (mw.ustring.find(config.geomask,";",0,true)and";")or","
 localpattern="%s*"..separator.."%s*"
 localmaskItems=mw.text.split(mw.ustring.gsub(config.geomask,"SWITCH:",""),pattern)
 localmaskLabels={}
 if#maskItems>1then
 fori,iteminipairs(maskItems)do
 table.insert(maskLabels,mw.wikibase.getLabel(item))
 end
 args.switch=table.concat(maskLabels,"###")
 maskItem="SWITCH:"..table.concat(maskItems,",")
 end
 end

 -- resolve geomask item id (if not using geomask switcher)
 ifnotmaskItemthen-- 
 localmaskType=util.idType(config.geomask)
 ifmaskType=='item'then
 maskItem=config.geomask
 elseifmaskType=="property"then
 maskItem=util.relatedEntity(wikidataId,config.geomask)
 end
 end

 -- if asking for shape or line from Wikidata
 -- and if Wikidata actually has shape/line data (wikidataProvidesGeo=true)
 -- and if no geomask
 -- and if zoom not explicitly set
 -- and if the object size inferred from its type is not too small
 -- then let Kartographer "take over" zoom
 if(forceLineorforceShapeor(useWikidataandnot(suppressShapeandsuppressLine)))
 andwikidataProvidesGeoandnotmaskItemandnotconfig.zoom
 andnot(config.typeandtinyType[config.type])then
 args.zoom=nil
 end

 -- Keep track of arg numbering
 localargNumber=''
 localfunctionincrementArgNumber()
 ifargNumber==''then
 argNumber=2
 else
 argNumber=argNumber+1
 end
 end

 -- Geomask
 ifmaskItemthen
 args["type"..argNumber]="shape-inverse"
 args["id"..argNumber]=maskItem
 args["stroke-width"..argNumber]=config["geomask-stroke-width"]orDEFAULT_GEOMASK_STROKE_WIDTH
 args["stroke-color"..argNumber]=config["geomask-stroke-color"]orconfig["geomask-stroke-colour"]orDEFAULT_GEOMASK_STROKE_COLOR
 args["fill"..argNumber]=config["geomask-fill"]orDEFAULT_GEOMASK_FILL
 args["fill-opacity"..argNumber]=config["geomask-fill-opacity"]orDEFAULT_SHAPE_FILL_OPACITY
 -- Let kartographer determine zoom and position, unless it is explicitly set in config
 ifnotconfig.zoomandnotconfig.switcherthen
 args.zoom=nil
 args["frame-coord"]=nil
 args["frame-lat"]=nil
 args["frame-long"]=nil
 localmaskArea=util.getStatementValue(util.getBestStatement(maskItem,'P2046'))
 end
 incrementArgNumber()
 -- Hack to fix phab:T255932
 ifnotargs.zoomthen
 args["type"..argNumber]="line"
 args["id"..argNumber]=maskItem
 args["stroke-width"..argNumber]=0
 incrementArgNumber()
 end
 end

 -- Shape (or shape-inverse)
 ifforceShapeor(useWikidataandnotsuppressShape)then
 args["type"..argNumber]=shapeType
 ifhasGeoshapeandnothasOsmRelationIdthen
 args["from"..argNumber]=string.sub(util.getStatementValue(util.getBestStatement(wikidataId,'P3896')),6)
 elseifconfig.idthen
 args["id"..argNumber]=config.id
 end
 args["stroke-width"..argNumber]=config["shape-stroke-width"]orconfig["stroke-width"]orDEFAULT_SHAPE_STROKE_WIDTH
 args["stroke-color"..argNumber]=config["shape-stroke-color"]orconfig["shape-stroke-colour"]orconfig["stroke-color"]orconfig["stroke-colour"]orDEFAULT_SHAPE_STROKE_COLOR
 args["fill"..argNumber]=config["shape-fill"]orDEFAULT_SHAPE_FILL
 args["fill-opacity"..argNumber]=config["shape-fill-opacity"]orDEFAULT_SHAPE_FILL_OPACITY
 incrementArgNumber()
 end

 -- Line
 ifforceLineor(useWikidataandnotsuppressLine)then
 args["type"..argNumber]="line"
 ifhasGeoshapeandnothasOsmRelationIdthen
 args["from"..argNumber]=string.sub(util.getStatementValue(util.getBestStatement(wikidataId,'P3896')),6)
 elseifconfig.idthen
 args["id"..argNumber]=config.id
 end
 args["stroke-width"..argNumber]=config["line-stroke-width"]orconfig["stroke-width"]orDEFAULT_LINE_STROKE_WIDTH
 args["stroke-color"..argNumber]=config["line-stroke-color"]orconfig["line-stroke-colour"]orconfig["stroke-color"]orconfig["stroke-colour"]orDEFAULT_LINE_STROKE_COLOR
 incrementArgNumber()
 end

 -- Point
 ifshouldShowPointMarkerthen
 args["type"..argNumber]="point"
 ifconfig.idthenargs["id"..argNumber]=config.idend
 ifconfig.coordthenargs["coord"..argNumber]=config.coordend
 ifconfig.markerthenargs["marker"..argNumber]=config.markerend
 args["marker-color"..argNumber]=config["marker-color"]orconfig["marker-colour"]orDEFAULT_MARKER_COLOR
 incrementArgNumber()
 end

 localmapframe=args.switchandmf.multi(args)ormf._main(args)
 localtracking=hasOsmRelationIdand''or'[[Category:Infobox mapframe without OSM relation ID on Wikidata]]'
 returnmapframe..tracking
 end

 returnp

AltStyle によって変換されたページ (->オリジナル) /