Template:Interactive map: Difference between revisions

From FHX Wiki
mNo edit summary
No edit summary
Line 19: Line 19:
  |center={{#expr:(({{{N}}}*0.006510)+50)}}, {{#expr:(({{{E}}}*0.006510)+50)}}
  |center={{#expr:(({{{N}}}*0.006510)+50)}}, {{#expr:(({{{E}}}*0.006510)+50)}}
  |image layers=V3 detailed map.png
  |image layers=V3 detailed map.png
  |zoom=5
  |zoom=6
  |scrollzoom=on
  |scrollzoom=on
  |minzoom=4
  |minzoom=4
  |maxzoom=6
  |maxzoom=8
}}|Depthless Orifice=
}}|Depthless Orifice=
map is work in progress
map is work in progress
|Great Rebellion=
{{#display_map:
|circles=50, 50:2~ ~ ~red~0.5~3~yellow~0.25;
|center=50, 50
|image layers=The Forest Of Abandoned map.png
|zoom=3
|scrollzoom=on
|minzoom=3
|maxzoom=5
}}|Great Rebellion=
map is work in progress
map is work in progress
|Snow Storm=
{{#display_map:
|circles=50, 50:2~ ~ ~red~0.5~3~yellow~0.25;
|center=50, 50
|image layers=Great Rebellion map.png
|zoom=3
|scrollzoom=on
|minzoom=3
|maxzoom=5
}}|Snow Storm=
map is work in progress
map is work in progress
|The Forest Of Abandoned=
{{#display_map:
|circles=50, 50:2~ ~ ~red~0.5~3~yellow~0.25;
|center=50, 50
|image layers=Snow Storm map.png
|zoom=3
|scrollzoom=on
|minzoom=3
|maxzoom=5
}}|The Forest Of Abandoned=
map is work in progress
map is work in progress
|The Valley Of Blood=
{{#display_map:
|circles=50, 50:2~ ~ ~red~0.5~3~yellow~0.25;
|center=50, 50
|image layers=The Forest Of Abandoned map.png
|zoom=3
|scrollzoom=on
|minzoom=3
|maxzoom=5
}}|The Valley Of Blood=
map is work in progress
map is work in progress
{{#display_map:
|circles=50, 50:2~ ~ ~red~0.5~3~yellow~0.25;
|center=50, 50
|image layers=The Valley Of Blood map.png
|zoom=3
|scrollzoom=on
|minzoom=3
|maxzoom=5
}}
}}
}}
<!--
<!--
Line 79: Line 120:
** Do the same with map parameter.
** Do the same with map parameter.
* Add condition to name parameter to default to <nowiki>{{PAGENAME}}</nowiki> if not included.
* Add condition to name parameter to default to <nowiki>{{PAGENAME}}</nowiki> if not included.
* Allow center to be configurable
* Adjust circle radius for smaller maps
* Adjust zoom values for smaller maps


</noinclude>
</noinclude>

Revision as of 06:25, 17 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...
{{interactive map|map=V3|N=0|E=0|name=Test|description=}}
Loading map...
{{interactive map|map=Great Rebellion|N=0|E=0|name=Test|description=}}

map is work in progress

Loading map...


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.
  • Allow center to be configurable
  • Adjust circle radius for smaller maps
  • Adjust zoom values for smaller maps