Difference between revisions of "Template:Test/Map"

From Wikispooks
Jump to navigation Jump to search
m (t)
m (t)
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>'''This template is for placing a GoogleMaps map and caption in a right-floating box.'''<br/>  
 
<noinclude>'''This template is for placing a GoogleMaps map and caption in a right-floating box.'''<br/>  
The caption text will wrap within the box border and the borders will expand to accommodate whatever width & height are specified for the map  
+
The caption text will wrap within the box border and the borders will expand to accommodate whatever width & height are specified for the map margin
margin
 
 
'''Usage:'''<br/>
 
'''Usage:'''<br/>
 
<nowiki>{{</nowiki>{{t|{{PAGENAME}}}}<br/>
 
<nowiki>{{</nowiki>{{t|{{PAGENAME}}}}<br/>
 
|{{t|coordinates}}= Mandatory. coordinate1,2~marker title~marker text; repeat for more markers<br/>
 
|{{t|coordinates}}= Mandatory. coordinate1,2~marker title~marker text; repeat for more markers<br/>
 +
|{{t|lines}}= optional lines. start coordinates1:next/end coordinates~label~text~color~opacity~weight; repeat for more lines</br>
 
|{{t|width}}= Optional. map width - whole number only - ie no 'px' (default 400)<br/>
 
|{{t|width}}= Optional. map width - whole number only - ie no 'px' (default 400)<br/>
 
|{{t|height}}= Optional. map height - whole number only - ie no 'px' (default 340)<br/>
 
|{{t|height}}= Optional. map height - whole number only - ie no 'px' (default 340)<br/>
Line 15: Line 15:
 
{| class="wikitable" style="float:{{#ifeq:{{{align|}}}|left|left; margin:1.0em 1.0em 0.8em 0.0em|right; margin: 1.0em 0.0em 0.8em 1.0em;}}"
 
{| class="wikitable" style="float:{{#ifeq:{{{align|}}}|left|left; margin:1.0em 1.0em 0.8em 0.0em|right; margin: 1.0em 0.0em 0.8em 1.0em;}}"
 
|-
 
|-
|{{#Display_map:{{{coordinates|}}}|{{#if:{{{width|}}}|width={{{width|}}}px|width=400px}}|{{#if:{{{height|}}}|height={{{height|}}}px|height=340px}}|{{#if:{{{zoom|}}}|zoom={{{zoom}}}}}|{{#if:{{{type|}}}|type={{{type|}}} }} }}
+
|{{#Display_map:{{{coordinates|}}}|{{#if:{{{width|}}}|width={{{width|}}}px|width=400px}}|{{#if:{{{height|}}}|height={{{height|}}}px|height=340px}}|{{#if:{{{zoom|}}}|zoom={{{zoom}}}}}|{{#if:{{{type|}}}|type={{{type|}}} }} {{{lines|}}} }}
 
|-
 
|-
 
|style="text-align:center; padding: 0.5em;" |{{#if:{{{caption|}}}|{{{caption|}}}}}
 
|style="text-align:center; padding: 0.5em;" |{{#if:{{{caption|}}}|{{{caption|}}}}}
 
|}</includeonly>
 
|}</includeonly>

Latest revision as of 17:16, 18 November 2015

This template is for placing a GoogleMaps map and caption in a right-floating box.
The caption text will wrap within the box border and the borders will expand to accommodate whatever width & height are specified for the map margin Usage:
{{Test/Map
|coordinates= Mandatory. coordinate1,2~marker title~marker text; repeat for more markers
|lines= optional lines. start coordinates1:next/end coordinates~label~text~color~opacity~weight; repeat for more lines
|width= Optional. map width - whole number only - ie no 'px' (default 400)
|height= Optional. map height - whole number only - ie no 'px' (default 340)
|caption= Optional. map caption - standard wikitext including links
|align= optional horizontal float. default is right. Use only to change to left
|zoom= Optional. whole number, 1 - 16
|type= Optional. roadmap, satellite, hybrid or terrain
}}