Шаблон:Infobox map — различия между версиями
Материал из Guild Wars 2 wiki
Blood (обсуждение | вклад) (Новая страница: «<includeonly><!--{{#if: {{{coordinates|}}}{{{path|}}}{{{bounds|}}} | {{#if: <!-- hide whitespace --> Attempt to add the suffix " (map icon)", but check first if…») |
Blood (обсуждение | вклад) |
||
Строка 1: | Строка 1: | ||
− | <includeonly> | + | <includeonly>{{#if: {{{coordinates|}}}{{{path|}}}{{{bounds|}}} |
| {{#if: <!-- hide whitespace --> | | {{#if: <!-- hide whitespace --> | ||
Строка 14: | Строка 14: | ||
}}}}<!-- | }}}}<!-- | ||
− | -->{{#Widget:Infobox map | + | --><!--{{#Widget:Infobox map |
| coordinates = {{{coordinates|}}} | | coordinates = {{{coordinates|}}} | ||
| path = {{{path|}}} | | path = {{{path|}}} | ||
Строка 42: | Строка 42: | ||
}} | }} | ||
| icon = {{filepath:{{#var:infobox map icon}}|32px}} | | icon = {{filepath:{{#var:infobox map icon}}|32px}} | ||
− | }} | + | }}--> |
}} | }} | ||
<p style="font-size:.9em;">Interactive map {{#if: {{{path|}}} | path }} {{#if: {{#explode:{{#explode:{{{coordinates|}}}|]|0}}|,|2}} | {{#switch: {{#explode:{{#explode:{{{coordinates|}}}|]|0}}|,|2}} | <p style="font-size:.9em;">Interactive map {{#if: {{{path|}}} | path }} {{#if: {{#explode:{{#explode:{{{coordinates|}}}|]|0}}|,|2}} | {{#switch: {{#explode:{{#explode:{{{coordinates|}}}|]|0}}|,|2}} | ||
Строка 50: | Строка 50: | ||
| 3 = (Depths) | | 3 = (Depths) | ||
| #default = (floor {{#explode:{{#explode:{{{coordinates|}}}|]|0}}|,|2}}) | | #default = (floor {{#explode:{{#explode:{{{coordinates|}}}|]|0}}|,|2}}) | ||
− | }} }}</p | + | }} }}</p></includeonly><noinclude> |
This template is a wrapper for [[Widget:Infobox map]], used in infoboxes to provide the GW2 map API with a marker indicating the NPC position. | This template is a wrapper for [[Widget:Infobox map]], used in infoboxes to provide the GW2 map API with a marker indicating the NPC position. | ||
Версия 01:00, 6 апреля 2023
This template is a wrapper for Widget:Infobox map, used in infoboxes to provide the GW2 map API with a marker indicating the NPC position.
Usage
{{Infobox map | coordinates = | path = | bounds = }}
Parameters
- coordinates
- [X,Y] coordinate pair. Integers between 0 and 32000. Wrap each value pair in brackets. Separate these multiple points with commas and wrap in an additional set of brackets if multiple different locations are possible. If a 3rd value in the first array is given, it will be interpreted as a floor. If a fourth value in the first array is given, it will be interpreted as a continent.
- path
- Requires multiple pairs of coordinates. Plots a green flag at the start, white dots between and a red flag at the end.
- bounds
- Multiple [X,Y] coordinate pairs to form a polygon on the map.
- type
- Optional. Used by non-npc infoboxes.
- localtiles
- Optional. If set, will use wiki tiles instead of the API. Only useful if the tiles exist in Category:Map raster tiles.
- requires
- Optional. If set to LWS4, LWS5 or any of the story releases part of those seasons, localtiles will be used.
- icon
- Optional. If set, for example "File:Merchant (map icon).png", changes the default icon from "File:Widget map dot.png" (this default is set at widget level).
Example
{{Infobox map | coordinates = [49028, 30881] }}
Used in
- Template:Adventure infobox
- Template:Location infobox
- Template:Event infobox
- Template:Heart infobox (also uses bounds)
- Template:NPC infobox
- Template:Object infobox
A quick guide to capturing coordinates
- Основная статья: Guild Wars 2 Wiki:Projects/NPC Coordinates/Guide
- If it's an event, use Widget:Event table.
- If it's a point of interest, or a heart NPC, use Widget:Map table.
- For all other cases:
- GW2Timer.com - clicking on any point generates the coordinates in the box in the bottom left corner.
- GW2Navi ingame overlay - same as the above external website but uses your ingame data to determine your location.