Template
Collapsible Map
From Dogcraft Wiki
No edit summary |
No edit summary |
||
Line 8: | Line 8: | ||
{{#ifeq:{{{scale|0}}}|0|<div class="inner-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] | ||
{{#if:{{{overlay|}}}|<div class="map-overlay-container">{{{overlay|}}}</div>}} | |||
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 | ||
<div id="marker-wrapper" style=" | <div id="marker-wrapper" style=" | ||
Line 23: | Line 24: | ||
{{#ifeq:{{{scale|0}}}|1|<div class="map-grid-container"> | {{#ifeq:{{{scale|0}}}|1|<div class="map-grid-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] | ||
{{#if:{{{overlay|}}}|<div class="map-overlay-container">{{{overlay|}}}</div>}} | |||
<div class="map-grid-child" 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 class="map-grid-child" 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 class="map-grid-child" 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 class="map-grid-child" 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> | ||
Line 70: | Line 72: | ||
|scale = 0 | |scale = 0 | ||
|width = 50% | |width = 50% | ||
}} | |||
{{Collapsible Map | |||
|name = East Station (Scale 0) | |||
|world = sheltie | |||
|xCoord = 1434 | |||
|zCoord = -294 | |||
|showCoords = true | |||
|scale = 0 | |||
|width = 50% | |||
|overlay = <div style="color: white;">Test overlay</div> | |||
}} | }} | ||
Line 114: | Line 127: | ||
"default": "500px", | "default": "500px", | ||
"description": "The max width of the map on a wiki page. This is a CSS value. To make the map cover the entire width of the page, set this to '100%'. The map is always square and the height will automatically adjust to be equal to the width." | "description": "The max width of the map on a wiki page. This is a CSS value. To make the map cover the entire width of the page, set this to '100%'. The map is always square and the height will automatically adjust to be equal to the width." | ||
}, | |||
"overlay": { | |||
"type": "string", | |||
"description": "Optional html overlay, which will be placed in a container div which is absolutely positioned and can overlay the map." | |||
} | } | ||
}, | }, | ||
Line 125: | Line 142: | ||
"showCoords", | "showCoords", | ||
"scale", | "scale", | ||
"width" | "width", | ||
"overlay" | |||
] | ] | ||
} | } | ||
</templatedata> | </templatedata> | ||
</noinclude> | </noinclude> |
Revision as of 13:12, 27 March 2024
X:1434, Z:-294 on Sheltie
X:1434, Z:-294 on Sheltie
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 |
width | width | The max width of the map on a wiki page. This is a CSS value. To make the map cover the entire width of the page, set this to '100%'. The map is always square and the height will automatically adjust to be equal to the width.
| String | optional |
overlay | overlay | Optional html overlay, which will be placed in a container div which is absolutely positioned and can overlay the map. | String | optional |