Template:Interactive map: Difference between revisions

From FHX Wiki
No edit summary
Line 4: Line 4:
  83.4, 74.5~North Gate~~Minimap-portal.gif;
  83.4, 74.5~North Gate~~Minimap-portal.gif;
  60.5, 46.8~Rog (V1)~~Minimap-etc.gif;
  60.5, 46.8~Rog (V1)~~Minimap-etc.gif;
  |circles={{#expr:(({{{N|}}}*0.00926)+50)}}, {{#expr:(({{{E|}}}*0.00926)+50)}}:1~{{{name|}}}~{{{description|}}}~red~0.5~3~yellow~0.25;
  |circles={{#expr:(({{{N}}}*0.00926)+50)}}, {{#expr:(({{{E}}}*0.00926)+50)}}:1~{{{name}}}~{{{description}}}~red~0.5~3~yellow~0.25;
  |center={{#expr:(({{{N|}}}*0.00926)+50)}}, {{#expr:(({{{E|}}}*0.00926)+50)}}
  |center={{#expr:(({{{N}}}*0.00926)+50)}}, {{#expr:(({{{E}}}*0.00926)+50)}}
  |image layers=V1 detailed map.png
  |image layers=V1 detailed map.png
  |zoom=5
  |zoom=5
Line 15: Line 15:
  16.8, 16.3~Portal to Silent Woods~~Minimap-portal.gif;
  16.8, 16.3~Portal to Silent Woods~~Minimap-portal.gif;
  11.75, 19.57~Rog Imperial City~[[Rog Imperial City (V3)|Rog Imperial City]]~Minimap-etc.gif;
  11.75, 19.57~Rog Imperial City~[[Rog Imperial City (V3)|Rog Imperial City]]~Minimap-etc.gif;
  |circles={{{N|}}}, {{{E|}}}:1~{{{name|}}}~{{{description|}}}~red~0.5~3~yellow~0.25;
  |circles={{{N|missing}}}, {{{E|missing}}}:1~{{{name}}}~{{{description}}}~red~0.5~3~yellow~0.25;
  |center={{{N|}}}, {{{E|}}}
  |center={{{N|missing}}}, {{{E|missing}}}
  |image layers=V3 detailed map.png
  |image layers=V3 detailed map.png
  |zoom=5
  |zoom=5
Line 47: Line 47:
;N : Required. In-game N coordinate (N from world map, or y from /location).
;N : Required. In-game N coordinate (N from world map, or y from /location).
;E : Required. In-game E coordinate (E from world map, or x from /location).
;E : Required. In-game E coordinate (E from world map, or x from /location).
;name : Optinal. Marker title. (may change wikitext to default name to <nowiki>{{PAGENAME}}</nowiki>)
;name : Optional. Marker title.
;description : Optional. Marker description.
;description : Optional. Marker description.


Line 59: Line 59:
</pre>
</pre>
{{interactive map|map=V3|N=15|E=18|name=Test|description=}}
{{interactive map|map=V3|N=15|E=18|name=Test|description=}}
== TODO ==
* Add <nowiki>{{#if:}}</nowiki> condition to N/E parameters to make them required, and return a default/error marker if missing.
** Do the same with map parameter.
* Add condition to name parameter to default to <nowiki>{{PAGENAME}}</nowiki> if not included.

Revision as of 03:08, 15 August 2024

Warning:
This page is in draft.

Description

This is the Interactive map template. It should be transcluded in the following format:

{{Interactive map
|map=
|N=
|E=
|name=
|description=
}}

Parameters

map
Required. Map to display.
N
Required. In-game N coordinate (N from world map, or y from /location).
E
Required. In-game E coordinate (E from world map, or x from /location).
name
Optional. Marker title.
description
Optional. Marker description.

Example

{{interactive map|map=V1|N=3289|E=3502|name=Cave Troll|description=Cave Troll, level 40, NE V1 near North Gate}}
Loading map...

Map: V1

Marker Name: Cave Troll

Wikimap Coordinates: 80.45614, 82.42852

Description: Cave Troll, level 40, NE V1 near North Gate

{{interactive map|map=V3|N=15|E=18|name=Test|description=}}
Loading map...

Map: V3

Marker Name: Test

Wikimap Coordinates: 50.1389, 50.16668

Description:

TODO

  • Add {{#if:}} condition to N/E parameters to make them required, and return a default/error marker if missing.
    • Do the same with map parameter.
  • Add condition to name parameter to default to {{PAGENAME}} if not included.