Կաղապար:Infobox map/doc

Վիքիպեդիայից՝ ազատ հանրագիտարանից

This helper template provides a way to display a map in an Infobox. Optionally a location marker can be included.

Օգտագործման ձևը[խմբագրել կոդը]

Parameter descriptions[խմբագրել կոդը]

Field name Description
map The name of the map to be displayed. This is the only required parameter.
map_width The width of the map image to be displayed. For example map_width=220 and not map_width=220px.
default_width When this template is used in another template, e.g. an infobox, the default width of the map image preferred by the infobox should be specified here. For example map_width=220. When used with location maps, this value may be modified by a certain value if specified in the location map template. The default value is 220px.
relief Selects a relief map when assigned any value. This only works when the geographical coordinates method is used and then only for a few maps. See Map display methods.
map_alt Alt text for the map. A visually impaired reader who uses a screen reader will have access to this text. See WP:ALT.
map_caption The caption that appears below the map if one is required.
mark The image file that will be used to mark the location on the map. The default is Red pog.svg. See below.
mark_width The width of the marker image to be displayed. For example mark_width=8 and not mark_width=8px. The default width is 8px.
label A text message that will be displayed next to the marker.
label_position The position of a label with respect to the marker. Valid values are left, right, top, bottom and none.
lat
long
Specifies the latitude and longitude of the location when the geographical coordinates method is used. This value may be specified as a signed decimal degree.
lat_deg
lat_min
lat_sec
lat_dir

lon_deg
lon_min
lon_sec
lon_dir

Specifies the latitude and longitude of the location when the geographical coordinates method is used. This value may be specified in dms+hemisphere format.
x
y
Specifies the position of the location marker. The coordinates of the marker in pixels based on a map width of 1000 pixels. The template will scale these values for proper display. See below.
x%
y%
Specifies the position of the location marker. x% specifies the percentage of the distance across the image from the left edge and y% specifies the percentage of the distance down from the top edge. See below.

Map display methods[խմբագրել կոդը]

There are three methods which can display a mark to on a map. These examples use {{Տեղեկաքարտ զբոսայգի}} which uses this template as a back end.

Display a marker on a map using a template and geographic coordinates[խմբագրել կոդը]

A marker can be superimposed on a map using one of a set of special map templates. To display a marker the geographic coordinates must be specified using the parameters lat_d, long_d, etc. See the documentation for {{Location map}}. The parameters for this template map to a subset of the parameters used by {{Location map}}. A map template can be found using these sources:

List of templates - Many of the listed items are redirects and a few templates may not function as expected.
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.

All of the names begin with the words "Location map" followed by the area covered. The value you need to specify is the area name. The map template for the Canada is Տեղորոշման քարտեզ Կանադա. In this case specify map=Canada.

Infobox map/doc
{{Infobox park
| name = Four Corners, Կանադա
| map = Canada
| map_caption = Աշխարհագրական կոորդինատները օգտագործելու օրինակ
| lat_d = 60 | lat_m = 00 | lat_s = 00 | lat_NS = N
| long_d = 102 | long_m = 00 | long_s = 00 | long_EW = W
}}

Display any image[խմբագրել կոդը]

Another option allows the display of any image without a location mark.

Միջին շրջանային Բրազիլական ընկույզի արտադրանքը (kg/ha)
Աշխարհի քարտեզ. բրազիլական ընկույզ արտադրող շրջանները:
{{Infobox
| above = Միջին շրջանային Բրազիլական ընկույզի արտադրանքը (kg/ha)
| image2 = {{Infobox map
           | map         = Braziloutput.png
           | map_alt     = Աշխարհի քարտեզ. բրազիլական ընկույզ արտադրող շրջանները:
           | map_caption =
           | map_width   = 200
           }}
}}

Marks[խմբագրել կոդը]

A mark can be any image file. The default mark is Red pog.svg and it works well because it is easy to pick up visually on most maps. Some examples are below. Click on an image to see the file description page.

See Location markers for other examples. Currently, using mark_width=n for n > 8 is not advised when a label is specified.

Geographical coordinates[խմբագրել կոդը]

To display coordinates in the Infobox two methods can be used. The template {{Infobox coord}} can be used to display coordinates entered using the method discussed above. If the X,Y method is used to display a marker then the template {{coord}} can be used. For examples of coordinate entry see coordinate examples.

TemplateData[խմբագրել կոդը]

No description.

Template parameters

ParameterDescriptionTypeStatus
Mapmap

The name of the map to be displayed

Տողrequired
Map Widthmap_width

The width of the map image to be displayed.

Թիվըoptional
Default Widthdefault_width

When this template is used in another template, the default width is given using this parameter

Թիվըoptional
Reliefrelief

Selects a relief map when assigned any value

Տողoptional
Map Alternative Textmap_alt

Alternative text to be displayed if the map isnt displayed for whatever reasons

Տողoptional
Map Captionmap_caption

Caption for the map

Տողoptional
Markmark

The image file that will be used to mark the location on the map

Էջoptional
Mark Widthmark_width

The width of the marker image to be displayed

Թիվըoptional
Labellabel

A text message that will be displayed next to the marker.

Տողoptional
Label Positionlabel_position

The position of a label with respect to the marker

Տողoptional
Latitudelat

Latitude of the map

Թիվըoptional
Longitudelong

Longitude of the map

Թիվըoptional
Xx

Specifies the position of x location marker

Թիվըoptional
Yy

Specifies the position of y location marker

Թիվըoptional
X%x%

x% specifies the percentage of the distance across the image from the left edge

Թիվըoptional
Y%y%

y% specifies the percentage of the distance down from the top edge

Թիվըoptional

Տես նաև[խմբագրել կոդը]