This is a documentation subpage for Module:Football map. It may contain usage information, categories and other content that is not part of the original module page. |
- coordinate location (P625) (see uses)
- home venue (P115) (see uses)
- image (P18) (see uses)
- occupant (P466) (see uses)
- maximum capacity (P1083) (see uses)
Overview
editThis module is used with the template {{football map}} to simplify creation of maps with the <mapframe> tag provided by the Kartographer extension.
The template takes the same parameters as <mapframe> and adds a number of markers using a series of |stadiumN parameters that are used to general the JSON data for the markers. The stadium data is either taken from an internal list or using Wikidata for the coordinates.
Examples:
- Template:Football map/demo — stadia of London football clubs (using data from module list)
- Template:Football map/demo2— stadia for the Russia World Cup in 2018 (using data supplied in template)
- Template:Football map/demo3 — a selection of English stadia (using a mixture of all three data sources)
- Template:Football map/demo4 — a map of the stadia in List of football stadiums in England (using Wikidata for data parameters)
- Template:Football map/demo5 — a list of clubs and their stadium for the 2018-19 Premier League season (using Wikidata for data parameters)
- User:Jts1882/maps/stadiums — a user test page with some mapframe related information and some more examples
Usage
edit{{#invoke:Football map|function_name}}
Template documentation
editThis is a documentation subpage for Module:Football map. It may contain usage information, categories and other content that is not part of the original module page. |
- coordinate location (P625) (see uses)
- home venue (P115) (see uses)
- image (P18) (see uses)
- occupant (P466) (see uses)
- maximum capacity (P1083) (see uses)
This template uses <mapframe>...</mapframe>
to display interactive maps of football stadia, using data supplied from the template, from Wikidata, and/or from lists defined in module subpages. The markers for each stadium have a popup
window with information on the stadium (e.g. image, description, capacity, etc.).
Usage
editThe simplest use of the template requires the basic mapframe parameters and a list of football stadia or football clubs.
Parameters
editMapframe parameters
edit|width=
and|height=
— set the dimensions of the map on the page|align=
— sets the position on the page (left, right, center)|latitude=
and|longitude=
— the coordinates of the map centre|zoom=
— a zoom factor with a value between 0 (whole world) to 19 (very local). See examples for typical values|text=
— a description of the map displayed as a footer.|frameless=
— to produce a frameless map (e.g. for an infobox).
For more further information see Kartographer extension.
Stadium and club lists
editA Mapframes
map can display markers for a number of geographical features, or a football stadia for this template. It takes the data in JSON format, but this template creates the JSON data from the parameters in the template. At its simplest, it needs a list of stadia or clubs set with the following parameters.
|stadiumN=
— a list of stadia with index N. The name must point to a valid Wikipedia page title.|clubN=
— a list of football clubs with index N. Wikidata is used to get the name of the home stadium.
Stadia and clubs can be mixed, but each index can only be used once. The maximum index is currently 200.
See below for more on customising the markers.
Sources of data
editEach marker needs the coordinates for its location. These can be provided in the template or got automatically from a list maintained in the module or from Wikidata. Parameters provided by the template have priority, followed those in the module lists and Wikidata.
|wikidata=
— makes Wikidata the first choice for data source. Values can be overridden by those set in the template parameters.|moduledata=
— makes the lists of data in the module the first choice for data source. Values can be overridden by those set in the template parameters.|templatedata=
— only uses data provided by the template.|latitudeN=
and|longitudeN=
— the coordinates of each stadium with the index specified|imageN=
— an image to display in the popup, entered in the form File:The Hive Stadium 3.jpg|descriptionN=
a description to display in the popup. This can contain any wiki markup, within reason.
Markers
editThe default markers:
|size=
— the size of the marker (small, medium, large )|color=
— the color of the marker (red, green, #0050d0, etc.)|symbol=
— the marker can take numbers, letters or custom symbols- use
-number
to number the markers (default) - use
-letter
to use a sequence of letters in the markers - use
soccer
,museum
, etc. to use a custom symbol (see mw:Help:Extension:Kartographer/IconsList of icons for more)
- use
The markers for any feature can be customised using a parameter with the index matching the feature name:
|sizeN=
— the size of the marker (small, medium, large). This is particularly useful for showing two stadia very close together (e.g. Goodison and Anfield), when making the one behind larger and/or on in front small makes them both easier to resolve. There is no control over the relative positions, which are set by<mapframe>...</mapframe>
(more northerly ones first)|colorN=
— the color of the marker (red, green, #0050d0, etc.)|symbolN=
— the marker can take numbers, letters or custom symbols.
Examples
editUsing data from module list
editUsing data supplied in template
editUsing Wikidata for data parameters
editUsing Wikidata for data parameters
editUsing a mixture of all three data sources
editUsing Wikidata for data parameters
edit