ਫਰਮਾ:Location map many
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. UsageThe 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.
Parameters
Note: For brevity, parameters "pos" & "bg" are aliases (for "position" & "background"), with pos2, bg2, pos3, bg3, etc. Alternative syntaxThe recommend input format for the marker coordinates is to use
MarkersWhen 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:
Advisory messagesThe 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:
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 mapsLocation maps can be found using these sources:
Creating new map definitionsSee Creating a new map definition. ExamplesMap with label "Pag" and "Anytown" (degrees)Recommended syntax {{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 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 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 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 diamondSite of Hispaniola {{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 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 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''
| mark9size = <!--label only-->1
| label9_size = 165
| coordinates9 = {{coord|42.60|14.4}}
}}
Map with a custom label and text backgroundImotski in Croatia {{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 labelPag Island in Croatia {{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 captionLua error in ਮੌਡਿਊਲ:Location_map/multi at line 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 HemisphereLockerbie in Scotland {{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° meridianModule: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. Lua error in ਮੌਡਿਊਲ:Location_map/multi at line 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 examplesLua error in ਮੌਡਿਊਲ:Location_map/multi at line 27: Unable to find the specified location map definition: "Module:Location map/data/Ukraine" does not exist. Lua error in ਮੌਡਿਊਲ:Location_map/multi at line 27: Unable to find the specified location map definition: "Module:Location map/data/Ukraine" does not exist.
Implementation notesThe 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:
See also
|
Portal di Ensiklopedia Dunia