Template:Mapframe/doc
This is a documentation subpage for Template:Mapframe. It contains usage information, categories, and other content that is not part of the original template page. |
Parameters
[edit]- frame = if it equals 1, a frame is created. Default value: 1.
- infobox = if it equals 1, the size is ideal for an infobox.
- align = to align the map frame. Possible values: right, left or center. Default value: right.
- caption = optional caption of the map (ignored if frame = 0 or if infobox = 1).
- list = show a legend with the list of points. If it equals 1, a single column list is inserted; if equals 2, a two-columns list is inserted.
- width = width of the map in px. Default value: 350 (260 if infobox = 1).
- height = height of the map in px. Default value: 300 (260 if infobox = 1).
- group = name (not numerical) to identify the map.
- centre_lat, centre_lon = coordinates of the centre. If they are not omitted, the centre coordinates are calculated.
- zoom = scale of the OSM map; the value is between 0 (world) e 18. For a single point the default value is 10 (13 if infobox = 1).
- autozoom = if it equals y, the scale is calculated to show all points; if it equals n an automatic mapframe zoom is used. For a single point the default zoom value is 10. Default value: y.
- color = default color for all points. Default value: #B80000.
- symbol = default symbol for all points (see map below). Use -number to show numbers or -letter to show letters. Default value: -number.
- Points
- lat1, lat2, ... = latitude
- lon1, lon2, ... = longitude
- color1, color2, ... = color
- name1, name2, ... = name
- desc1, desc2, ... = description with links and images.
- symbol1, symbol2, ... = symbol (see map below). Use -number to show numbers or -letter to show letters. Default value: -number.
- size1, size2, ... = size. Values: small, medium, large. Default value: medium.
- Data
- data = GeoJSON data
Examples
[edit]{{Mapframe |caption = Map caption |symbol1 = village |lat1 = 41.740548 |lon1 = 12.233389 |name1 = Name |group = a }}
{{Mapframe |lat1 = 43.786922 |lon1 = 12.077667 |name1 = Sorgente del [[Tevere]] |symbol1 = museum |lat2 = 41.740548 |lon2 = 12.233389 |name2 = Foce del [[Tevere]] a [[Roma]] |color2 = #008000 |symbol2 = restaurant |lat3 = 48.856667 |lon3 = 2.351944 |name3 = [[Parigi]] |color3 = #0000b8 |symbol3 = library |gruppo = b }}
{{Mapframe |list=1 |group = esempio-elenco |lat1 = 43.786922 |lon1 = 12.077667 |name1 = Point 1 |lat2 = 41.740548 |lon2 = 12.233389 |name2 = Point 2 |lat3 = 48.856667 |lon3 = 2.351944 |name3 = Point 3 }}
{{Mapframe |caption = Louvre |centre_lat = 48.8610 |centre_lon = 2.3359 |zoom = 15 |data = { "type": "ExternalData", "service": "geoshape", "ids": "Q19675" } }}
{{Mapframe |caption = [[w:Autostrada A11 (Italy)|Autostrada A11 (Italy)]] |width = 400 |centre_lat = 43.8187 |centre_lon = 10.7682 |zoom = 9 |data = { "type": "ExternalData", "service": "geoline", "ids": "Q781975", "properties": { "stroke": "#07852c", "stroke-width": 8 } } }}
Map with available symbols
[edit]
No description.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Frame | frame | Check to add a frame, uncheck to remove the frame (if typing in wikitext, write 1 for frame and 0 for frameless)
| Boolean | suggested |
Infobox | infobox | Check to adjust the map size to fit in an infobox (if typing in wikitext, write 1)
| Boolean | optional |
Align | align | Align the mapframe within the article content, similar to an image
| String | suggested |
Caption | caption | Add a caption to the map, similar to an image. If frameless or formatted for an infobox, this value will be ignored. | Content | suggested |
List | list | Display a legend with a list of points. If value is "1" the legend is shown in a single column. If value is "2" a two-columns list is shown.
| Number | suggested |
Width | width | Width of the map in pixels. Do not write "px" after. If formatted for infobox, it will automatically be set to 260.
| Number | suggested |
Height | Height | Height of the map in pixels. Do not write "px" after. If formatted for infobox, it will automatically be set to 260.
| Number | suggested |
Group | group | Name (not numerical) to identify the map | Unknown | optional |
Center latitude | centre_lat | Latitude of center coordinate | Unknown | required |
Center longitude | centre_lon | Longitude of the center coordinate | Unknown | required |
Zoom | zoom | Scale of the map. Value is between 0 (world scale) and 18 (very zoomed in). If infobox is selected, then default is 13.
| Number | suggested |
Autozoom | autozoom | If it equals "y" the scale is automatically calculated to show all points included on the map. If it equals "n" an automatic zoom is used.
| Unknown | optional |
Color | color | The default color for all the points or markers added to the map. Must be hex value with # included.
| Unknown | optional |
lat1 | lat1 | Latitude of the first marker | Unknown | optional |
lat2 | lat2 | Latitude of the second marker | Unknown | optional |
lat3 | lat3 | Latitude of the third marker | Unknown | optional |
lat4 | lat4 | Latitude of the fourth marker, more can be added lat5, lat6, etc... | Unknown | optional |
lon1 | lon1 | Longitude of the first marker | Unknown | optional |
lon2 | lon2 | Longitude of the second marker | Unknown | optional |
lon3 | lon3 | Longitude of the third marker | Unknown | optional |
lon4 | lon4 | Longitude of the fourth marker, more can be added lon5, lon6, etc... | Unknown | optional |
color1 | color1 | Color of the first marker | Unknown | optional |
color2 | color2 | Color of the second marker | Unknown | optional |
color3 | color3 | Color of the third marker | Unknown | optional |
color4 | color4 | Color of the fourth marker, more can be added color5, color6, etc. | Unknown | optional |
name1 | name1 | Name of the first marker | Unknown | optional |
name2 | name2 | Name of the second marker | Unknown | optional |
name3 | name3 | Name of the third marker | Unknown | optional |
name4 | name4 | Name of the fourth marker, can add more name5, name6, etc. | Unknown | optional |
desc1 | desc1 | Description of first marker, can include links and images. | String | optional |
desc2 | desc2 | Description of second marker, can include links and images. | String | optional |
desc3 | desc3 | Description of third marker, can include links and images. | String | optional |
desc4 | desc4 | Description of fourth marker, can include links and images. Can add more desc5, desc6, etc. | String | optional |
symbol1 | symbol1 | Icon to show in first marker. Choose -number to show consecutive numbers for makers or -letter to show letters.
| String | optional |
symbol2 | symbol2 | Icon to show in second marker. Choose -number to show consecutive numbers for makers or -letter to show letters.
| String | optional |
symbol3 | symbol3 | Icon to show in third marker. Choose -number to show consecutive numbers for makers or -letter to show letters.
| String | optional |
symbol4 | symbol4 | Icon to show in fourth marker. Choose -number to show consecutive numbers for makers or -letter to show letters.
| String | optional |
size1 | size1 | Size of the first marker
| String | optional |
size2 | size2 | Size of the second marker
| String | optional |
size3 | size3 | Size of the third marker
| String | optional |
size4 | size4 | Size of the fourth marker
| String | optional |
Data | data | Add additional GeoJSON data, for example to add a geoshape | Unknown | optional |