localp={}localmapsizes={["DEU"]="200",["USA"]="290x172"}functionp.map(frame)localpframe=frame:getParent()localconfig=frame.args-- the arguments passed BY the template, in the wikitext of the template itselflocalargs=pframe.args-- the arguments passed TO the template, in the wikitext that transcludes the templatelocalmap_custom=args.map_customorargs['نقشه سفارشی']or''localmap=args.maporargs['نقشه']or''ifmap_custom=="yes"ormap_custom=="بله"thenreturn'<span style="white-space:nowrap;">'..map..'</span>'endifmap==''thenlocalentity=mw.wikibase.getEntity()or{}localclaims=entity.claimsor{}localmapProp=claims.p15ifnotmapPropormapProp[0].mainsnak.snaktype~='value'thenreturn""endmap=mapProp[0].mainsnak.datavalue.valueendlocalfilecode="[[پرونده:"..map.."|"localcountrymod=require"Module:Infobox road/meta/mask/country"localcountryarg=args.countryorargs['کشور']localstate=args.stateorargs['ایالت']orargs.provinceorargs['استان']localcountry=''ifcountryargandstatethencountry=countrymod._country(state,countryarg)endlocalmapsize=mapsizes[country]or'290'localalt=args.map_altorargs['جایگزین نقشه']or''filecode=filecode..mapsize..'px|جایگزین='..alt..']]'returnfilecodeendreturnp