Difference between revisions of "Template:LegMap"
Jump to navigation
Jump to search
(pushed from fahl by wikipush) |
|||
(30 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<noinclude> | <noinclude> | ||
− | Template to display leg routes on | + | Template to display leg routes on a Map. |
+ | see {{Link|target=:Template:LegMapLines}} | ||
=== Usage === | === Usage === | ||
<pre>{{LegMap | <pre>{{LegMap | ||
|center=cityName | |center=cityName | ||
− | |zoom=12}}</pre> | + | |zoom=12 |
+ | |debug=false}}</pre> | ||
[[Category:Template]] | [[Category:Template]] | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
− | {{#ask:[[-Has subobject::{{FULLPAGENAME}}]] [[ | + | {{#vardefine:leg_lines|{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[IsA::Leg]] |
|mainlabel=- | |mainlabel=- | ||
− | |?Leg from | + | |?Leg from=from |
− | |?Leg to | + | |?Leg to=to |
+ | |?Leg transport=transport | ||
|format=template | |format=template | ||
|template=LegLine | |template=LegLine | ||
Line 16: | Line 19: | ||
|named args=yes | |named args=yes | ||
|sep=: | |sep=: | ||
− | }} | + | }}}} |
− | {{# | + | {{#if:{{{debug|}}}| |
− | + | == Lines == | |
+ | {{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[Leg_from::+]] | ||
|mainlabel=- | |mainlabel=- | ||
− | |?Leg from | + | |?Leg wp_num=# |
− | |?Leg to | + | |?Leg from=from |
+ | |?Leg to=to | ||
+ | |?Leg transport=transport | ||
+ | |format=table | ||
|sort=Leg wp_num | |sort=Leg wp_num | ||
− | + | }} | |
− | | | + | {{#var:leg_lines}} |
− | | | + | |
− | | | + | == LegMapLines == |
− | | | + | }} |
− | |center={{{center| | + | {{LegMapLines |
+ | |lines={{#var:leg_lines}} | ||
+ | |title={{{title|Legs}}} | ||
+ | |subtitle={{{subtitle|from subobjects}}} | ||
+ | |color={{{color|blue}}} | ||
+ | |center={{{center|}}} | ||
|zoom={{{zoom|12}}} | |zoom={{{zoom|12}}} | ||
− | |height= | + | |width={{{width|800}}} |
− | | | + | |height={{{height|600}}} |
+ | |debug={{{debug|}}} | ||
+ | }} | ||
</includeonly> | </includeonly> |
Latest revision as of 16:37, 19 January 2025
Template to display leg routes on a Map. see Template:LegMapLines
Usage
{{LegMap |center=cityName |zoom=12 |debug=false}}