साँचा:Location map many/doc
यह प्रलेखन उपपृष्ठ साँचा:Location map many के लिए है। इसमें उपयोग विधि की जानकारी, श्रेणियाँ और वह वस्तुएँ हैं जो कि असली साँचा के पृष्ठ पर नही हैं। |
This template uses Lua: |
Template:Location map many creates a location map as a composite image of an existing map, with multiple markers and optional labels superimposed onto it. This template functions in the style of Template:Location map, but allows multiple markers and labels (rather than just one marker).
See also Template:Location map+, which specifies points as a coded template list of markers/labels.
Usage
[स्रोत सम्पादित करौ]The first unnamed parameter (shown as {{{1}}} below) specifies a map definition. If {{{1}}} is Spain, the map image and coordinates are based on the values defined for Spain in Module:Location map/data/Spain if it exists, or in Template:Location map Spain otherwise.
{{Location map many | {{{1}}} | width = | float = | border = | caption = | alt = | relief = | AlternativeMap = <!--first label/marker--> | label1 = <!-- or: label --> | label1_size = <!-- or: label_size --> | position1 = <!-- or: position, pos1, pos --> | background1 = <!-- or: background, bg1, bg --> | mark1 = <!-- or: mark --> | mark1size = <!-- or: marksize --> | link1 = <!-- or: link --> | coordinates1= <!-- {{coord|...}}--><!-- or: coordinates--> <!--second label/marker--> | label2 = | label2_size = | label2_width= | position2 = <!-- or: pos2 --> | background2 = <!-- or: bg2 --> | mark2 = | mark2size = | link2 = | coordinates2= <!-- {{coord| }} --> <!--repeat as needed--> }} |
Parameters
[स्रोत सम्पादित करौ]Map display parameters | |
---|---|
Parameter | Description |
साँचा:Mono | Required. Use the name of the map as the first unnamed parameter. For example, specifying England will use the values for England in Module:Location map/data/England if it exists, or {{Location map England}} otherwise. See the examples below. |
साँचा:Mono | Determines the width of the map in pixels. The default is 240. Do not include px , for example: width=300 , not width=300px .
|
साँचा:Mono | Specifies the position of the map on the page. Valid values are left , right , center and none . The default is right .
|
साँचा:Mono | Specifies the color of the 1px map border. The default is lightgrey (see web colors). If set to none , no border will be generated. This parameter is seldom used.
|
साँचा:Mono | The text of a caption to be displayed below the map. Specifying a caption will cause the map to be displayed with a frame. If caption is defined but is not assigned a value, the map will not be framed and no caption will be displayed. If caption is not defined, the map will not be framed and a default caption will be generated. The default caption is created from the साँचा:Mono parameter (or the current page name if label not defined) and the साँचा:Mono parameter from map definition template. See the examples below.
|
साँचा:Mono | Alt text for map; used by screen readers, see WP:ALT. |
साँचा:Mono | Any non-blank value (1, yes, etc.) will cause the template to display the map specified in the map definition template as साँचा:Mono, which is usually a relief map. See the example at Location map+/relief. |
साँचा:Mono | Allows the use of an alternative map. The image must have the same edge coordinates as the location map template. See the example at Location map+/AlternativeMap. |
साँचा:Mono | Allows an overlay to be superimposed on the map. This parameter is seldom used. See the example at Location map+/overlay. |
Label and mark parameters | |
Parameter | Description |
साँचा:Mono साँचा:Mono ... |
The text of the label to display next to the mark. A wiki link can be used. The default if not specified is no label, just the marker. |
साँचा:Mono साँचा:Mono ... |
The font size to use for the label, given as a percentage of the normal font size (<100 = smaller, >100 = larger). The default is 90. Do not include % , for example: label_size=80 , not label_size=80% .
|
साँचा:Mono साँचा:Mono ... |
The width to use for the label, given as an em size; the default width is 6. Do not include em , for example: label_width=7 , not label_width=7em .
|
साँचा:Mono साँचा:Mono ... |
The position of the label relative to the mark. Valid values are left , right , top and bottom . The default is right .
|
साँचा:Mono साँचा:Mono ... |
The background color to use for the label. See Web colors. The default is no background color, which shows the map image behind the label. |
साँचा:Mono साँचा:Mono ... |
The name of an image to display as the mark. The default is Red pog.svg (). See examples at Commons:Location markers and Commons:Category:Map icons. |
साँचा:Mono साँचा:Mono ... |
The size of the mark in pixels. The default is 8. Do not include px , for example: marksize=10 , not marksize=10px .
|
साँचा:Mono साँचा:Mono ... |
Specifies a wiki link which will be followed if the reader clicks on the mark. The name of the linked article is displayed when the mouse pointer hovers over the mark. |
साँचा:Mono साँचा:Mono ... |
Required. The coordinates using a {{coord}}
template. See the Alternative syntax section below for alternatives. |
Note: For brevity, parameters "pos" & "bg" are aliases (for "position" & "background"), with pos2, bg2, pos3, bg3, etc.
Alternative syntax
[स्रोत सम्पादित करौ]The recommend input format for the marker coordinates is to use |coordinatesX={{coord|...}}
, where X
is the marker number. However, when used outside of infoboxes, the template supports splitting the coordinates into individual components using the parameters listed below.
Alternative map display parameters | |
---|---|
Parameter | Description |
साँचा:Mono साँचा:Mono ... |
The degrees of latitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified. |
साँचा:Mono साँचा:Mono ... |
The minutes of latitude. |
साँचा:Mono साँचा:Mono ... |
The seconds of latitude. Usually not necessary. |
साँचा:Mono साँचा:Mono ... |
N if north (default value) or S for south of the Equator. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for southern latitude). |
साँचा:Mono साँचा:Mono ... |
The degrees of longitude. This value can be specified using decimal degrees and when this format is used minutes and seconds should not be specified. |
साँचा:Mono साँचा:Mono ... |
The minutes of longitude. |
साँचा:Mono साँचा:Mono ... |
The seconds of longitude. Usually not necessary. |
साँचा:Mono साँचा:Mono ... |
E for east (default value) or W for west of the Prime Meridian. Other values will be disregarded. Not required if using signed decimal degrees (i.e. negative numbers for western longitude). |
Markers
[स्रोत सम्पादित करौ]When a marker's mark#size=0, then that marker is skipped and only the related label is displayed, without the marker.
Each mark, mark2, mark3 (etc.) can be another image-symbol, such as Diamond sheer red 20.gif (marksize=20) to show a red diamond on the image: or use: Cercle rouge 100%.svg to show a red circle or a larger black diamond: Diamond sheer black 37.gif as sized with a larger marksize=37 or similar number to resize the diamond somewhat:
- See Wikimedia pointer symbols: commons:Category:Map pointers.
Advisory messages
[स्रोत सम्पादित करौ]The degrees of latitude/longitude are validated, to show error messages, but location minutes can be set very large to place markers outside the map (with no warnings). Due to the numerous details of specifying multiple markers/labels, the latitude and longitude are checked to lie within the actual map limits specified in Template:Location_map_<parameter1>. Each marker/label is checked and can list a warning message (under the map), such as:
- Latitude#4 (45.68) < map min(53.74).
Processing continues, with that marker actually placed off-map, and all latitude/longitude parameters are checked. Only degrees of latitude/longitude are checked, so a value of 63 minutes would be valid to indicate 1 extra degree + 3 minutes, and setting lon_min=200 could still place a marker off-map (right-side) with no warning message. Also, large markers or long labels can spill over the edges of a map, allowing markers to point inward from outside the map. In such cases, a map could be centered by itself on the page ("float=center") to avoid overlapping the edge markers onto any surrounding article text.
Available maps
[स्रोत सम्पादित करौ]Location maps can be found using these sources:
- Special:PrefixIndex/Module:Location map/data/ - Checked before a map template is searched for. New maps should be created here rather than creating new templates.
- List of templates - 1050 templates available when the list was generated.
- Category:Location map templates - templates sorted by category.
- Special:WhatLinksHere/Template:Location map/Info - a search that might help.
- Special:Prefixindex/Template:Location map - another search that might help.
Creating new map definitions
[स्रोत सम्पादित करौ]See Creating a new map definition.
Examples
[स्रोत सम्पादित करौ]Map with label "Pag" and "Anytown" (degrees)
[स्रोत सम्पादित करौ]Recommended syntax लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 280 | float = right | label = Pag | marksize = 8 | pos = right | bg = yellow | coordinates = {{coord|44|26|N|15|3|E}} | label2 = Anytown_Anywhere | mark2 = Rouge-Admin JollyRoger.svg | mark2size = 45 | pos2 = top | bg2 = white | coordinates2 = {{coord|46|30|N|17|30|E}} }}
Alternative syntax लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 280 | float = right | label = Pag | marksize = 8 | pos = right | bg = yellow | lat_deg = 44 | lat_min = 26 | lon_deg = 15 | lon_min = 3 | label2 = Anytown_Anywhere | mark2 = Rouge-Admin JollyRoger.svg | mark2size = 45 | pos2 = top | bg2 = white | lat2_deg = 46 | lat2_min = 30 | lon2_deg = 17 | lon2_min = 30 }}
Map with 3 labels (decimal)
[स्रोत सम्पादित करौ]Recommended syntax लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 260 | float = right | label = Pag | pos = right | marksize = 8 | coordinates = {{coord|44.44|15.05}} | label2 = Anytown | pos2 = bottom | bg2 = yellow | mark2size = 8 | coordinates2 = {{coord|45.86|17.50}} | label3 = Anytown2 | pos3 = top | bg3 = lightgreen | coordinates3 = {{coord|46.23|18.43}} }}
Alternative syntax लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 260 | float = right | label = Pag | pos = right | marksize = 8 | lat_deg = 44.44 | lon_deg = 15.05 | label2 = Anytown | pos2 = bottom | bg2 = yellow | mark2size = 8 | lat2_deg = 45.86 | lon2_deg = 17.50 | label3 = Anytown2 | pos3 = top | bg3 = lightgreen | lat3_deg = 46.23 | lon3_deg = 18.43 }}
Example map with red diamond
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/100x100" does not exist।
{{Location map many | 100x100 | AlternativeMap = LocationJamaica.svg | float = right | width = 250 | caption = Site of '''Hispaniola''' | label = Hispaniola | position = left | background = #CCDDFF | marksize = 1 | coordinates = {{coord|38.2|69.3}} | label2 = | mark2 =Diamond_sheer_red_37.png | mark2size = 42 | coordinates2 = {{coord|52.2|73.9}} | label3 = Cuba | pos3 = left | mark3size = 1 | coordinates3 = {{coord|59.2|68.0}} }}
Map with some labels outside map
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia
| width = 260
| float = right
| label = Pag | position=right
| marksize = 8
| coordinates = {{coord|44.44|15.05}}
| label2 = Anytown
| pos2 = bottom
| bg2 = yellow
| coordinates2 = {{coord|47.40|12.80}}
| outside2 = 1 <!-- we know this point is outside the map, so don't warn about it -->
| label3 = Anytown2
| pos3 = top
| bg3 = lightgreen
| coordinates3 = {{coord|41.98|18.43}}
| outside3 = 1 <!-- we know this point is outside the map, so don't warn about it -->
| label4 = North Croatia
| pos4 = left
| bg4 = lightgreen
| mark4size = 0
| coordinates4 = {{coord|46.22|17.7}}
}}
Map with 9 markers (decimal)
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 260 | float = right | label = Pag | position = right | coordinates = {{coord|44.44|15.05}} | label2 = Anytown | label2_size = 110 | pos2 = bottom | background2 = yellow | coordinates2 = {{coord|45.86|17.50}} | label3 = Anytown2 | label3_size = 290 | pos3 = top | background3 = green | coordinates3 = {{coord|46.23|18.43}} | mark4 =Diamond_sheer_black_20.png | mark4size = 19 | label4 = 44.0 (latitude) | coordinates4 = {{coord|44.00|13.5}} | mark5 =Diamond_sheer_black_20.png | mark5size = 20 | label5 = 44.5 | coordinates5 = {{coord|44.50|13.5}} | mark6 =Diamond_sheer_black_20.png | mark6size = 20 | label6 = 45.0 | coordinates6 = {{coord|45.00|13.5}} | mark7 =Diamond_sheer_black_20.png | mark7size = 20 | label7 = 45.5 | coordinates7 = {{coord|45.50|13.5}} | mark8 =Diamond_sheer_black_20.png | mark8size = 20 | label8 = 46.0 | coordinates8 = {{coord|46.00|13.5}} | label9 = ''CROATIA'' | label9_size = 165 | mark9size = <!--label only-->1 | coordinates9 = {{coord|42.60|14.4}} }}
Map with a custom label and text background
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 280 | float = right | caption = Imotski in Croatia | label = Imotski | position = right | background = #FFFFDD | coordinates = {{coord|43.44|17.21}} }}
Map with enlarged marker and label
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Croatia" does not exist।
{{Location map many | Croatia | width = 260 | float = right | caption = Pag Island in Croatia | label = Pag | label_size = 200 | position = right | marksize = 14 | background = #FFFFDD | coordinates = {{coord|44.44|15.05}} }}
Map with no caption
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Bosnia" does not exist।
{{Location map many | Bosnia | width = 150 | float = right | caption = | label = Brčko | position = left | coordinates = {{coord|44.87|18.81}} }}
Western Hemisphere
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/United Kingdom" does not exist।
{{Location map many | United Kingdom | width = 180 | float = right | caption = Lockerbie in Scotland | label = Lockerbie | position = right | coordinates = {{coord|55|07|16|N|3|21|19|W}} }}
Map that crosses 180° meridian
[स्रोत सम्पादित करौ]Module:Location map/data/Russia Chukotka Autonomous Okrug is an example of a map that crosses the 180th meridian. To the west of 180°, in the Eastern Hemisphere, is Pevek at 170°17′E longitude. To the east of 180°, in the Western Hemisphere, is Uelen at 169°48′W longitude.
लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 143 पर: Unable to find the specified location map definition: "Module:Location map/data/Russia Chukotka Autonomous Okrug" does not exist।
{{Location map many | Russia Chukotka Autonomous Okrug | float = right | width = 250 | caption = [[Chukotka Autonomous Okrug]] | label1 = Pevek | coordinates1 = {{coord|69|42|N|170|17|E}} | label2 = Uelen | coordinates2 = {{coord|66|09|N|169|48|W}} }}
Marker examples
[स्रोत सम्पादित करौ]लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 27 पर: Unable to find the specified location map definition: "Module:Location map/data/Ukraine" does not exist। लुआ त्रुटि मोड्यूल:Location_map/multi में पंक्ति 27 पर: Unable to find the specified location map definition: "Module:Location map/data/Ukraine" does not exist।
- See Wikimedia pointer symbols: commons:Category:Map pointers.
Implementation notes
[स्रोत सम्पादित करौ]The map with markers/labels is implemented as nested HTML divisions. The map-image is in an HTML division, containing each point as a percent-locator division containing a marker-image sub-division plus a label sub-division. Each point is calculated (for a percent-locator division) with X or Y coordinate "XX.X%" or "YY.Y%" as follows:
- The div-tag is साँचा:Tag
- For placing latitude, the calculation is:
- साँचा:Mono
- If साँचा:Mono is empty, the combined decimal latitude is used from "lat".
- If साँचा:Mono is "S" (south), the latitude is multiplied by -1.
- (Note latitude is positioned in reverse, from top of map downward.)
- For placing longitude, the calculation is:
- साँचा:Mono
- If साँचा:Mono is empty, the combined decimal longitude is used as "long".
- If साँचा:Mono is "W" (west), the longitude is multiplied by -1.
- The div-tag is ended as
."height: 0; width: 0; margin: 0; padding: 0;">
- Within that division the marker/label sub-divisions are coded as:
- For label position, the options are shifted as:
- when
, addsposition:left
left: -6.5em; text-align: right;
- when
, addsposition:right
left: 0.5em; text-align: left;"
- when
, addsposition:top
top:-2.65em; left:-3em; text-align: center;"
- when
, addsposition:bottom
top:-0.15em; left: -3em; text-align: center;" to div-tag.
- when
See also
[स्रोत सम्पादित करौ]- Template:Location map - placing one marker/label by latitude/longitude.
- Template:Location map+ - placing unlimited list of markers/labels.
- Commons:Category:Map pointers - list of the many Wikimedia Commons pointer symbols.