Jump to content

Module:US elections imagemap/doc: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Created page with '{{lua sidebar}} {{Module rating |alpha}} <!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see Wikipedia:Wiki...'
 
No edit summary
Line 2: Line 2:
{{Module rating |alpha}}
{{Module rating |alpha}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
=== Usage ===
== Usage ==
'''For most uses, use the wrapped template at {{t|US elections imagemap}}. This page is mainly documentation for Module maintainers.'''
'''For general usage, use the wrapped template at {{t|US elections imagemap}}. This page is mainly documentation for Module maintainers.'''

== Functions ==
=== <code>makeMap</code> ===
Generates the inner part of an imagemap. Needs to be wrapped with imagemap tags to work, this only generates state shapes and links. This is due to a limitation in Lua modules.
{| class="wikitable"
|+ Parameters
|-
! Parameter !! Usage !! Example
|-
| '''link_template''' || Template for links || 2018 STATE gubernatorial election
|-
| '''cycle''' || The election cycle || Gov2
|-
| extra_states || Extra states to include (<code>;</code> delimited) || OR;WV
|}
For valid values of {{para|cycle}}, see [[Module:US elections imagemap/data]].


<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |
<includeonly>{{#ifeq:{{SUBPAGENAME}}|sandbox | |

Revision as of 05:08, 19 January 2021

Usage

For general usage, use the wrapped template at {{US elections imagemap}}. This page is mainly documentation for Module maintainers.

Functions

makeMap

Generates the inner part of an imagemap. Needs to be wrapped with imagemap tags to work, this only generates state shapes and links. This is due to a limitation in Lua modules.

Parameters
Parameter Usage Example
link_template Template for links 2018 STATE gubernatorial election
cycle The election cycle Gov2
extra_states Extra states to include (; delimited) OR;WV

For valid values of |cycle=, see Module:US elections imagemap/data.