Шаблон:Карта розташування

(Перенаправлено з Шаблон:Location map)
{{i}} Документація шаблону[перегляд] [редагувати] [історія] [очистити кеш]

Зауваження! Шаблон було оновлено. Стара версія доступна, як {{Карта розташування/стара}} Цей шаблон генерує карту розташування у вигляді композитного зображення, яке складається з карти та мітки розташування. Додатково можуть додаватися підписи мітки та підпис карти.

Використання

Файли зображень карт використовуються не на пряму, але за допомогою допоміжних визначень карт. Наприклад, якщо перший безіменний параметр заданий у цьому шаблонів буде "Японія", тоді цей шаблон використовує запис для Японії у Модуль:Location map/data/Японія якщо він існує, або інакше {{Карта розташування Японія}}, один з яких містить дані, необхідні для генерації складеного зображення.

Будь ласка, зауважте
  • Надаючи будь-яке значення параметру caption спричиняє відображення карти у рамці. Якщо цей параметр не оголошено, шаблон згенерує стандартний підпис.
  • Координати не перевіряються. Якщо вказані координати виходять за межі області, яка охоплюється зображенням карти, мітка місця розташування не буде відображатися всередині зображення; проте, вона може відображатися в іншому місці на сторінці.
  • Не використовуйте px. Використання width=200px зазвичай спричиняє відображення дуже великої карти. Використовуйте width=200.
  • Для створення карти із більш ніж однією міткою місця розташування використовуйте {{Карта розташування+}} або {{Карта розташування багато}}.

Бланкові шаблони

Карта розташування. Карта розташування: США
Карта розташування
Розташування Єллоустоуну в північно-західній частині Сполучених Штатів
Десяткові градуси Градуси, мінути, секунди Із {{Coord}}
(зазвичай для карток)
Вікідані
{{Карта розташування
| {{{1}}}
| width      = 
| float      = 
| border     = 
| caption    = 
| alt        = 
| relief     = 
| AlternativeMap = 
| overlay_image = 
| label      = 
| label_size = 
| position   = 
| background = 
| mark       = 
| marksize   = 
| link       = 
| lat_deg    = 
| lon_deg    = 
}}
{{Карта розташування
| {{{1}}}
| width      = 
| float      = 
| border     = 
| caption    = 
| alt        = 
| relief     = 
| AlternativeMap = 
| overlay_image = 
| label      = 
| label_size = 
| position   = 
| background = 
| mark       = 
| marksize   = 
| link       = 
| lat_deg    = 
| lat_min    = 
| lat_sec    = 
| lat_dir    = 
| lon_deg    = 
| lon_min    = 
| lon_sec    = 
| lon_dir    = 
}}
{{Карта розташування
| {{{1}}}
| width      = 
| float      = 
| border     = 
| caption    = 
| alt        = 
| relief     = 
| AlternativeMap = 
| overlay_image = 
| label      = 
| label_size = 
| position   = 
| background = 
| mark       = 
| marksize   = 
| coordinates = 
}}
{{Карта розташування
| {{{1}}}
| width      = 
| float      = 
| border     = 
| caption    = 
| alt        = 
| relief     = 
| AlternativeMap = 
| overlay_image = 
| label      = 
| label_size = 
| position   = 
| background = 
| mark       = 
| marksize   = 
}}

Параметри

Параметри відображення карти
Параметр Опис
{{{1}}} Обов'язковий. Використовуйте назву карти, як перший безіменний параметр. Наприклад, зазначення Англія буде викликати значення для Англії з Модуль:Location map/data/Англія якщо він існує, або у протилежному випадку {{Карта розташування Англія}}. Дивіться приклади наведені нижче. Можливе відображення декількох карт через зазначення переліку назв карт розділених символом #. Для декількох карт, перша відображається за замовчуванням, а наступні читач може вибирати через радіо-кнопки.
width Визначає ширину карти у пікселях, перезаписуючи будь-які стандартні значення. не включайте px, Наприклад: width=300, а не width=300px.
default_width Визначає стандартну ширину карти у пікселях, призначається для використання у шаблонах, наприклад, картках (інфобоксах) географічних об'єктів. стандартне значення становить 240. Не включайте px. Це значення буде помножене на параметр defaultscale, який визначається у окремих шаблонах карт, якщо він існує, з метою досягнення прийнятного розміру для вертикальних карт. Наприклад, якщо задано default_width=200, карта Таїланду буде відображатись із шириною 200 * 0,57 = 114 пікселів (як визначено у Шаблон:Карта розташування Таїланд).
float Визначає розміщення карти на сторінці. Допустимі значення left, right, center та none. Стандартно right.
border Визначає колір границі карти у 1px. Стандартне значення lightgrey (див. вебкольори). Якщо визначено, як none, границя не буде генеруватись. Цей параметр використовується рідко.
caption Текст підпису для відображення під картою. Визначення підпису спричинить оформлення карти у рамку. Якщо caption визначено, але йому не задано значення, карта не буде оформлена у рамку і підпис не буде відображатися. Якщо caption не визначено, то карта не буде оформлена у рамку та буде згенеровано стандартний підпис. Стандартний підпис генерується з параметру label (або назви поточної сторінки, якщо label не визначено) та параметру name з шаблону визначення карти. Дивіться приклади наведені нижче.
alt Альтернативний текст для карти; використовується у читачах екранів, див. ВП:АЛЬТ[en].
relief Будь-яке не порожнє значення (1, так, і т.д.) спричинить відображення у шаблоні карти визначеної у шаблоні визначення карти, як image1, яка зазвичай є картою рельєфу. Дивіться приклади у Карта розташування+/relief.
AlternativeMap Дозволяє використовувати альтернативну карту. Зображення повинно мати той же край координат як і шаблон карти розташування. Див. приклад у Карта розташування+/AlternativeMap.
overlay_image Дозволяє накладення шару на карту. Цей параметр використовується рідко. Див. приклад у Карта розташування+/overlay.
Параметри мітки і її підпису
Параметр Опис
label 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.
label_size 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%. If set to 0, the label is only displayed when the user hovers over the mark.
label_width The width to use for the label, given as an em size. The default is 6. Do not include em, for example: label_width=7, not label_width=7em.
position The position of the label relative to the mark. Valid values are left, right, top,bottom and none. This defaults to either left or right, depending on the coordinates of the marker and its position relative to the right border of the map image. When position=none any defined label will not be displayed with the mark, but it will be used to create the default caption.
background 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.
mark 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.
marksize The size of the mark in pixels. The default is 8. Do not include px, for example: marksize=10, not marksize=10px.
link Specifies a wiki link which will be followed if the reader clicks on the mark. Do not include [[]], for example: link=Yellowstone National Park, not link=[[Yellowstone National Park]].
lat_deg Required. 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.
lat_min The minutes of latitude.
lat_sec The seconds of latitude. Usually not necessary.
lat_dir 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).
lon_deg Required. 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.
lon_min The minutes of longitude.
lon_sec The seconds of longitude. Usually not necessary.
lon_dir 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).

Доступні карти

Шаблони карт розташування станом на 5 листопада 2014. Для пошуку найкращого шаблону карти розташування, який охоплює певну територію, відкрийте файл SVG у браузер та використовуйте кнопки вказівників та функцію наближення. Наведення не регіон показує його назву та підсвічує його. Натисніть для того щоб відкрити сторінку.

There are over 1000 maps available. To find other maps:

Створення нових карт та визначень

Див. Створення нового визначення карти.

Приклади

Default width and float, no label, default caption (decimal coordinates)

Note: When a label is not specified, the default caption is "Page name (Map name)", so if this example was viewed on a page named Pag, the default caption would be "Pag (Croatia)". Likewise, on a page named Pag (town), the default caption would be "Pag (town) (Croatia)".

Pag is on an island.
Pag is on an island.
Карта розташування (Хорватія)
{{Карта розташування | Хорватія
| alt     = Pag is on an island.
| lat_deg = 44.44
| lon_deg = 15.05
}}

Карта з стандартним підписом (градуси/мінути)

Зауваження: Коли підпис мітки визначено, стандартний підпис буде мати вигляд "Текст підпису мітки (Назва карти)", що видно у вигляді "Pag (Croatia)" у прикладі.

Pag is on an island.
Pag is on an island.
Pag
Pag (Хорватія)
{{Карта розташування | Хорватія
| width = 200
| float = right
| alt = Pag is on an island.
| label = Pag
| position = right
| mark = Green pog.svg <!--green dot-->
| lat_deg = 44 | lat_min = 26 <!-- default: lat_dir = N -->
| lon_deg = 15 | lon_min = 3  <!-- default: lon_dir = E -->
}}

Коли |position=none, текст мітки не відображається поряд із нею, але все ще використовується у стандартному підписі та стандартному альтернативному тексті.

Pag. Карта розташування: Хорватія
Pag
Pag (Хорватія)
{{Карта розташування | Хорватія
| width = 200
| float = right
| label = Pag
| position = none
| mark = Green pog.svg <!--green dot-->
| lat_deg = 44 | lat_min = 26 <!-- default: lat_dir = N -->
| lon_deg = 15 | lon_min = 3  <!-- default: lon_dir = E -->
}}

Mark outside of map border, no caption

Rimini in Italy (outside the map)
Rimini in Italy (outside the map)
Rimini
{{Карта розташування | Хорватія
| width    = 200
| float    = right
| caption  =
| alt      = Rimini in Italy (outside the map)
| lat_deg  = 44.05
| lon_deg  = 12.57 <!--outside map's left border at 13.1-->
| outside  = 1 <!-- we're aware the point is outside the map, so suppress the warning category -->
| label    = Rimini
| position = right
}}

Caption, label_size, background, mark, marksize

Map of Italy with mark showing location of Rimini
Map of Italy with mark showing location of Rimini
Rimini
Location of Rimini in Italy
{{Карта розташування | Італія
| width      = 200
| float      = right
| caption    = Location of Rimini in Italy
| alt        = Map of Italy with mark showing location of Rimini
| label      = Rimini
| label_size = 150 <!--150% of normal size-->
| position   = bottom
| background = orange
| mark       = Orange_pog.svg
| marksize   = 12 <!--size in pixels-->
| lat_deg    = 44.05
| lon_deg    = 12.57
}}

Параметр AlternativeMap

Map of Italy with mark showing location of Rome
Map of Italy with mark showing location of Rome
Rome
Location of Rome in Italy
{{Карта розташування | Італія
| AlternativeMap = Italy location map.svg
| width   = 200
| float   = right
| caption = Location of Rome in Italy
| alt     = Map of Italy with mark showing location of Rome
| label   = Rome
| lat_deg = 41.9
| lon_deg = 12.5
}}

Параметр relief

Also demonstrates automatic positioning of label to the left, due to far right position of mark.

Biratnagar Airport is located in southeastern Nepal
Biratnagar Airport is located in southeastern Nepal
Biratnagar
Location of Biratnagar Airport in Nepal
{{Карта розташування | Непал
| relief = yes
| caption = Location of Biratnagar Airport in Nepal
| alt = Biratnagar Airport is located in southeastern Nepal
| label = Biratnagar
| mark = Airplane silhouette.svg
| marksize = 10
| lat_deg = 26 | lat_min = 28 | lat_sec = 53 | lat_dir = N
| lon_deg = 87 | lon_min = 15 | lon_sec = 50 | lon_dir = E
}}
Biratnagar Airport is located in southeastern Nepal
Biratnagar Airport is located in southeastern Nepal
Biratnagar
Location of Biratnagar Airport in Nepal
{{Карта розташування | Непал
| relief = 
| caption = Location of Biratnagar Airport in Nepal
| alt = Biratnagar Airport is located in southeastern Nepal
| label = Biratnagar
| mark = Airplane silhouette.svg
| marksize = 10
| lat_deg = 26 | lat_min = 28 | lat_sec = 53 | lat_dir = N
| lon_deg = 87 | lon_min = 15 | lon_sec = 50 | lon_dir = E
}}

Користувацький вибір декількох карт

Lockerbie is in southern Scotland.
Lockerbie is in southern Scotland.
Lockerbie
Lockerbie in Scotland, UK
Lockerbie is in southern Scotland.
Lockerbie is in southern Scotland.
Lockerbie
Lockerbie in Scotland, UK
{{Карта розташування | СК Шотландія#СК
| relief = 1
| width = 180
| float = right
| caption = Lockerbie in Scotland, UK
| alt = Lockerbie is in southern Scotland.
| label = Lockerbie
| mark = Blue_pog.svg
| marksize = 9
| lat_deg = 55 | lat_min = 07 | lat_sec = 16 | lat_dir = N
| lon_deg = 03 | lon_min = 21 | lon_sec = 19 | lon_dir = W
}}

Карти, які перетинають 180° меридіан

Див. Category:Location map templates crossing 180th meridian
Suva. Карта розташування: Фіджі
Suva
Suva
Suva (Фіджі)
{{Карта розташування | Fiji
| width      = 180
| float      = right
| label      = Suva
| position   = right
| background = yellow
| mark       = Locator_Dot.png
| marksize   = 7
| lat_deg =  18 | lat_min =  8 | lat_sec = 0 | lat_dir = S
| lon_deg = 178 | lon_min = 26 | lon_sec = 0 | lon_dir = E
}}

Дані шаблону

Див. також


Задля подібних прикладів, див. документацію Шаблон:Карта розташування+, як і
Шаблони карт розташування
Інші шаблони
Картки, які включають Карту розташування - будья-яку країну або регіон
Перелік
Картки, які включають Карту розташування - певні країни або регіони