Jump to content

Template:Cyclone map/doc

From Wikipedia, the free encyclopedia


Usage

[edit]

The simplest use of the template requires the basic mapframe parameters and a list of storms identified by a Wikipedia page name or a Wikidata IDs.

Mapframe parameters

  • |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.

Storm list

A Mapframes map can display markers for a number of geographical features, in this case stormse. It takes the data in JSON format, more specifically GeoJSON. This template creates the JSON data from the parameters in the template and information stored on Wikidata. At its simplest, it needs a list of storms set with the following parameters.

  • |nameN= (N = 1, 2, 3 ... 200) — the name of a storm with a Wikipedia page. The name must be the full name of the page, including any disambiguation. The storm data is retrieved from Wikidata using the Wikidata ID associated with the page.
  • |idN= (N = 1, 2, 3 ... 200) — a Wikidata ID for a storm.

These parameters can be mixed together in a list, but each storm needs a separate index number. The maximum index is currently 200.

Each storm needs the coordinates for its location and path. By default they are retrieved from Wikidata, but they can also be provided explcitly in the template.

  • |latitudeN= and |longitudeN= the set coordinates of the storm with the index specified
  • |imageN= indicates an image to display in the popup window, entered in the form File:Patricia 2015-10-23 1730Z (Worldview).jpg
  • |descriptionN= provides a description to display in the popup window. This can contain any wiki markup, within reason.

See below for more on customising lines and markers.

Modifying marker appearance

The parameters |marker-color=, |marker-size= and |marker-symbol= set the properties of the markers indicating each point in the storm path. The default is to let the storm type set the marker colour. The marker colour, size and symbol can be changed for all storms (parameter without index) or individually using the indexed parameters.

  • |marker-color=, |marker-color1=, |marker-color2=, etc. set the colour of the marker (red, green, #0050d0, etc). The default uses the storm type according to the colours at Tropical cyclone scales#Comparisons across basins.
  • |marker-size=, |marker-size1=, |marker-size2=, etc. set the size of the marker (small, medium, large )
  • |marker-symbol=, |marker-symbol1=, |marker-symbol2=, etc. sets the marker symbol, which can be numbers, letters or custom symbols. Use |marker-symbol=-number to number the markers sequentially or |marker-symbol=-letter to use a sequence of letters in the markers. For more examples of custom symbols see List of icons.

As an alternative to the markers, symbols of defined shape and colour can be added as polygons. While the storm map template system is in development this is set with |test2=, which suppresses the standard markers and marks the coordinate with polygons.

  • |symbol-shape=, |symbol-shape1=, |symbol-shape2=, etc. set the shape of the symbol marking to coordinate. These parameters apply to all points in a storms path. Symbols available include circle, square, triangle, inverse-triangle, diamond, hexagon, octagon, star, star4 (four pointed), star5 (five-pointed), star8 (8-pointed), and star12 (twelve-pointed). By default the symbol is determined by storm type (tropical, subtropical, extratropical).
  • |symbol-size=, |symbol-size1=, |symbol-size2=, etc. set the size of the symbol. By default the value is 0.3, which is the radius of the shape in degrees of latitude/longitude.
  • |symbol-fill=, |symbol-fill1=, |symbol-fill2=, etc. set the color of the symbol. By default this is set by storm intensity (set according to this storm intensity chart).
  • |symbol-stroke-width=, |symbol-stroke-width1=, |symbol-stroke-width2=, etc. set the width of the border line of the symbol.
  • |symbol-stroke=, |symbol-stroke1=, |symbol-stroke2=, etc. set the color of the border line of the symbol.
  • |symbol-fill-opacity=, |symbol-stroke-opacity=, and their indexed counterparts set the opacity of the stroke border and shape fill color.


Modifying line appearance

The parameters |stroke=, |stroke-width= and |stroke-opacity= set the properties of the line between each point in the storm path. The default is to let the storm type set the line colour. The line colour, line width and line opacity can be changed for all storms (parameter without index) or individually using the indexed parameters.

  • |stroke=, |stroke1=, |stroke2=, etc. set the colour of the line between each point in the storm path. The default uses the storm type according to the colours at Tropical cyclone scales#Comparisons across basins.
  • |stroke-width=, |stroke-width1=, |stroke-width2=, etc. set the stroke width of the lines between each point in the storm path.
  • |stroke-opacity=, |stroke-opacity1=, |stroke-opacity2=, etc. set the opacity of the lines between each point in the storm path.

Examples

[edit]

Note: Most of these examples below use information in a Wikidata sandbox that has been since removed. The data can be seen in the coordinate location section of this page from the history.


Basic map with four storms, one using a Wikidata ID and the others using Wikipedia article names
{{Cyclone map  
|width=400 |height=270 |align=right
|zoom=1 
|id1=Q15397819
|name2=Hurricane Patricia
|name3=Hurricane Katrina
|name4=1935 Labor Day hurricane
}}
Map
Map showing storm with path (default settings)
{{Cyclone map  
|width=400 |height=270 |align=right
|latitude=15 |longitude=82 |zoom=4 
|id1=Q15397819
}}
Map
Change marker and stroke proporties
{{Cyclone map 
|width=400 |height=270 |align=right
|latitude=15 |longitude=82 |zoom=4
|marker-color1=#bbccff  |marker-symbol1=-number
|stroke-width1=50 |stroke1=#D3D3D3 |stroke-opacity1=0.7 
|name2=Hurricane Patricia
|id1=Q15397819
}}
Map

Test examples

[edit]
Test version for "lineString" symbols on line with single marker
{{Cyclone map  |mode=test
|width=400 |height=270 |align=right
|latitude=15 |longitude=82 |zoom=4 
|stroke1=auto |stroke-width1=3
|id1=Q15397819
}}
Map
Test version for "polygon" symbols on line
{{Cyclone map  
|width=400 |height=270 |align=right
|latitude=15 |longitude=82 |zoom=4 
|stroke1=auto |stroke-width1=5
|id1=Q15397819
}}
Map
Example with cyclone symbol
{{Cyclone map
|width=400 |height=270 |align=right |latitude=15 |longitude=82 |zoom=4 
|id1=Q15397819
|symbol-shape=cyclone             <!-- circle with four tails -->
|symbol-stroke-width=0
|stroke-width1=1 |stroke=#000000 <!-- black line for path, 1px width -->
}}
Map
Test for defaults for cyclone map template
{{Cyclone map |id1=Q15397819 }}
Map