Template
Collapsible Map
From Dogcraft Wiki
No edit summary |
(added scale parameter) |
||
Line 6: | Line 6: | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
<div id="outer-map-container"> | <div id="outer-map-container"> | ||
{{#ifeq:{{{scale|0}}}|0|<div class="inner-map-container"> | |||
[https://dogcraft.net/map#{{lc:{{{world|sheltie}}}}}:{{{xCoord|0}}}:0:{{{zCoord|0}}}:250:0:0:0:0:perspective Click for full map] | [https://dogcraft.net/map#{{lc:{{{world|sheltie}}}}}:{{{xCoord|0}}}:0:{{{zCoord|0}}}:250:0:0:0:0:perspective Click for full map] | ||
https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500)}}/z{{#expr: floor({{{zCoord|0}}} / 500)}}.png | https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500)}}/z{{#expr: floor({{{zCoord|0}}} / 500)}}.png | ||
Line 18: | Line 19: | ||
| {{#expr: ({{{zCoord|0}}} mod 500) / 5.01}}}}% - 70px); | | {{#expr: ({{{zCoord|0}}} mod 500) / 5.01}}}}% - 70px); | ||
> | > | ||
<i class="fa-solid fa-location-dot"></i> | <i class="fa-solid fa-location-dot"></i> | ||
</div>}} | |||
{{#ifeq:{{{scale|0}}}|1|<div class"map-3x3-container"> | |||
<div id="map-1-1">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500) - 1}}/z{{#expr: floor({{{zCoord|0}}} / 500) - 1}}.png</div> | |||
<div id="map-1-2">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500)}}/z{{#expr: floor({{{zCoord|0}}} / 500) - 1}}.png</div> | |||
<div id="map-1-3">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500) + 1}}/z{{#expr: floor({{{zCoord|0}}} / 500) - 1}}.png</div> | |||
<div id="map-2-1">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500) - 1}}/z{{#expr: floor({{{zCoord|0}}} / 500)}}.png</div> | |||
<div class="inner-map-container" id="map-2-2"> | |||
[https://dogcraft.net/map#{{lc:{{{world|sheltie}}}}}:{{{xCoord|0}}}:0:{{{zCoord|0}}}:250:0:0:0:0:perspective Click for full map] | |||
https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500)}}/z{{#expr: floor({{{zCoord|0}}} / 500)}}.png | |||
<div id="marker-wrapper" style=" | |||
left: calc( | |||
{{#ifexpr: {{#expr: {{{xCoord|0}}} mod 500}} < 0 | |||
| {{#expr: (500 + ({{{xCoord|0}}} mod 500)) / 5.01}} | |||
| {{#expr: ({{{xCoord|0}}} mod 500) / 5.01}}}}% - 30px); | |||
top: calc( | |||
{{#ifexpr: {{#expr: {{{zCoord|0}}} mod 500}} < 0 | |||
| {{#expr: (500 + ({{{zCoord|0}}} mod 500)) / 5.01}} | |||
| {{#expr: ({{{zCoord|0}}} mod 500) / 5.01}}}}% - 70px); | |||
> | |||
<i class="fa-solid fa-location-dot"></i> | |||
</div> | |||
<div id="map-2-3">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500) + 1}}/z{{#expr: floor({{{zCoord|0}}} / 500)}}.png</div> | |||
<div id="map-3-1">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500) - 1}}/z{{#expr: floor({{{zCoord|0}}} / 500) + 1}}.png</div> | |||
<div id="map-3-2">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500)}}/z{{#expr: floor({{{zCoord|0}}} / 500) + 1}}.png</div> | |||
<div id="map-3-3">https://map.dogcraft.net/maps/{{lc:{{{world|sheltie}}}}}/tiles/1/x{{#expr: floor({{{xCoord|0}}} / 500) + 1}}/z{{#expr: floor({{{zCoord|0}}} / 500) + 1}}.png</div> | |||
</div>}} | |||
</div> | </div> | ||
{{#ifeq:{{{showCoords|}}}|true|<p id="coord-text">X:{{{xCoord|0}}}, Z:{{{zCoord|0}}} on {{ucfirst:{{{world|sheltie}}}}}</p>}} | {{#ifeq:{{{showCoords|}}}|true|<p id="coord-text">X:{{{xCoord|0}}}, Z:{{{zCoord|0}}} on {{ucfirst:{{{world|sheltie}}}}}</p>}} | ||
Line 66: | Line 93: | ||
"default": "false", | "default": "false", | ||
"description": "If true, will display the coordinates and world below the map" | "description": "If true, will display the coordinates and world below the map" | ||
}, | |||
"scale": { | |||
"type": "number", | |||
"default": "0", | |||
"description": "The scale of the map. 0 - 500x500 block map, 1 - 1500x1500 map" | |||
} | } | ||
}, | }, | ||
Line 75: | Line 107: | ||
"zCoord", | "zCoord", | ||
"collapsed", | "collapsed", | ||
"showCoords" | "showCoords", | ||
"scale" | |||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Revision as of 15:25, 26 March 2024
East Station
X:1434, Z:-294 on Sheltie
Map Location, shows a part of the map with the given location marked on it
Parameter | Description | Type | Status | |
---|---|---|---|---|
name | name | Name of the location. Used only in the heading
| String | optional |
world | world | The world the location is on. This needs to match the world name used on the dynmap!
| String | optional |
xCoord | xCoord | The x coordinate of the location
| Number | optional |
zCoord | zCoord | The z coordinate of the location
| Number | optional |
collapsed | collapsed | If true, the map is collapsed by default, otherwise it is expanded by default
| Boolean | optional |
showCoords | showCoords | If true, will display the coordinates and world below the map
| Boolean | optional |
scale | scale | The scale of the map. 0 - 500x500 block map, 1 - 1500x1500 map
| Number | optional |
This page was last modified on 26 March 2024, at 15:25. (23 days ago)