Template:Interactive map: Difference between revisions

From FHX Wiki
No edit summary
No edit summary
Line 2: Line 2:
map is work in progress
map is work in progress
{{#display_map:
{{#display_map:
  50, 50~Center~Test~Minimap-quest.gif;
  {{#expr:((1153*0.009259)+50)}}, {{#expr:((-376*0.009259)+50)}}~[[Rog Imperial City (V1)|Rog Imperial City]]~ ~Minimap-town.gif;
83.4, 74.5~North Gate~~Minimap-portal.gif;
  |circles={{#if:{{{N|}}}|{{#expr:(({{{N}}}*0.009259)+50)}}, {{#expr:(({{{E}}}*0.009259)+50)}}:1~{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}~{{#if:{{{description|}}}|{{{description}}}}}~red~0.5~3~yellow~0.25;}}
60.5, 46.8~Rog (V1)~~Minimap-etc.gif;
  |center={{#if:{{{N|}}}|{{#expr:(({{{N}}}*0.009259)+50)}}, {{#expr:(({{{E}}}*0.009259)+50)}}|{{#expr:((1153*0.009259)+50)}}, {{#expr:((-376*0.009259)+50)}}}}
  |circles={{#expr:(({{{N}}}*0.009259)+50)}}, {{#expr:(({{{E}}}*0.009259)+50)}}:1~{{{name}}}~{{{description}}}~red~0.5~3~yellow~0.25;
  |center={{#expr:(({{{N}}}*0.009259)+50)}}, {{#expr:(({{{E}}}*0.009259)+50)}}
  |image layers=V1 detailed map.png
  |image layers=V1 detailed map.png
  |zoom=5
  |zoom=5
  |scrollzoom=on
  |scrollzoom=on
  |minzoom=4
  |minzoom=3
  |maxzoom=6
  |maxzoom=6
}}|V3=
}}|V3=
Line 49: Line 47:
  {{#expr:((751*0.006510)+50)}}, {{#expr:((-1421*0.006510)+50)}}~GVG Entrance~[[The Forest of the Abandoned]]~Minimap-fortress.gif;
  {{#expr:((751*0.006510)+50)}}, {{#expr:((-1421*0.006510)+50)}}~GVG Entrance~[[The Forest of the Abandoned]]~Minimap-fortress.gif;
  {{#expr:((-313*0.006510)+50)}}, {{#expr:((-1945*0.006510)+50)}}~Arena Entrance~[[Great Rebellion]]~Minimap-fortress.gif;
  {{#expr:((-313*0.006510)+50)}}, {{#expr:((-1945*0.006510)+50)}}~Arena Entrance~[[Great Rebellion]]~Minimap-fortress.gif;
  |circles={{#if:{{{N|}}}|{{#expr:(({{{N}}}*0.006510)+50)}}, {{#expr:(({{{E}}}*0.006510)+50)}}:1~{{{name}}}~{{{description}}}~red~0.5~3~yellow~0.25;}}
  |circles={{#if:{{{N|}}}|{{#expr:(({{{N}}}*0.006510)+50)}}, {{#expr:(({{{E}}}*0.006510)+50)}}:1~{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}~{{#if:{{{description|}}}|{{{description}}}}}~red~0.5~3~yellow~0.25;}}
  |center={{#if:{{{N|}}}|{{#expr:(({{{N}}}*0.006510)+50)}}, {{#expr:(({{{E}}}*0.006510)+50)}}|15,22}}
  |center={{#if:{{{N|}}}|{{#expr:(({{{N}}}*0.006510)+50)}}, {{#expr:(({{{E}}}*0.006510)+50)}}|{{#expr:((-5342*0.006510)+50)}}, {{#expr:((-4330*0.006510)+50)}}}}
  |image layers=V3 detailed map.png
  |image layers=V3 detailed map.png
  |zoom=6
  |zoom=6
Line 107: Line 105:
  |maxzoom=5
  |maxzoom=5
}}
}}
}}
}}</includeonly><noinclude>
<!--
Map: {{{map|}}}
 
Marker Name: {{{name|}}}
 
Wikimap Coordinates: {{#expr:(({{{N|}}}*0.009259)+50)}}, {{#expr:(({{{E|}}}*0.009259)+50)}}
 
Description: {{{description|}}}--></includeonly><noinclude>
== Description ==
== Description ==
This is the '''{{PAGENAME}}''' template.
This is the '''{{PAGENAME}}''' template.
Line 129: Line 119:
</pre>
</pre>
== Parameters ==
== Parameters ==
;map : Required. Map to display.
;map : Required. Map to display. Options:
::V1
::V3
::Depthless Orifice
::Great Rebellion
::Snow Storm
::The Forest Of Abandoned
::The Valley Of Blood
;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).
Line 137: Line 134:
== Example ==
== Example ==
<pre>
<pre>
{{interactive map|map=V1|N=3289|E=3502|name=Cave Troll|description=Cave Troll, level 40, NE V1 near North Gate}}
{{interactive map|map=V1}}
</pre>
</pre>
{{interactive map|map=V1|N=3289|E=3502|name=Cave Troll|description=Cave Troll, level 40, NE V1 near North Gate}}
{{interactive map|map=V1}}
 
<pre>
<pre>
{{interactive map|map=V3}}
{{interactive map|map=V3}}
</pre>
</pre>
{{interactive map|map=V3}}
{{interactive map|map=V3}}
<pre>
<pre>
{{interactive map|map=Great Rebellion|N=0|E=0|name=Test|description=}}
{{interactive map|map=Great Rebellion|N=0|E=0|name=Test|description=}}
Line 152: Line 151:
* Add <nowiki>{{#if:}}</nowiki> condition to N/E parameters to make them required, and return a default/error marker if missing.
* 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.
** Do the same with map parameter.
* Add condition to name parameter to default to <nowiki>{{PAGENAME}}</nowiki> if not included.
* Allow center to be configurable as a parameter
* Allow center to be configurable
** If center= contains T text (areas), set to C coordinates, else use N/E, else default to Rog, else default to center
* Allow height/width to be configurable
* Allow height/width to be configurable
* Adjust circle radius for smaller maps
** As parameter, mainly for adding into infoboxes - if blank, default auto
* Adjust zoom values for smaller maps
* Upload lower res "clean" versions of each map to display as thumbnails in location infoboxes.
* Upload lower res "clean" versions of each map to display as thumbnails in location infoboxes.
* Look into adding cluster function
* Look into adding cluster function

Revision as of 08:20, 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. Options:
V1
V3
Depthless Orifice
Great Rebellion
Snow Storm
The Forest Of Abandoned
The Valley Of Blood
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}}

map is work in progress

Loading map...
{{interactive map|map=V3}}

map is work in progress

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.
  • Allow center to be configurable as a parameter
    • If center= contains T text (areas), set to C coordinates, else use N/E, else default to Rog, else default to center
  • Allow height/width to be configurable
    • As parameter, mainly for adding into infoboxes - if blank, default auto
  • Upload lower res "clean" versions of each map to display as thumbnails in location infoboxes.
  • Look into adding cluster function
  • Add markers for unmarked towns/cities (eg. Midland, Dusty Town, Gypsy Village, etc.)