Difference between revisions of "Template:LegMap"

From BITPlan E-Bike Wiki
Jump to navigation Jump to search
(pushed from fahl by wikipush)
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
Template to display leg routes on OpenStreetMap.
+
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>
Line 11: Line 13:
 
|?Leg from=from
 
|?Leg from=from
 
|?Leg to=to
 
|?Leg to=to
 +
|?Leg transport=transport
 
|format=template
 
|format=template
 
|template=LegLine
 
|template=LegLine
 
|sort=Leg wp_num
 
|sort=Leg wp_num
|order=asc
 
 
|named args=yes
 
|named args=yes
 
|sep=:
 
|sep=:
 
}}}}
 
}}}}
 +
{{#if:{{{debug|}}}|
 
== Lines ==
 
== Lines ==
 
{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[Leg_from::+]]
 
{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[Leg_from::+]]
 
|mainlabel=-
 
|mainlabel=-
 +
|?Leg wp_num=#
 
|?Leg from=from
 
|?Leg from=from
 
|?Leg to=to
 
|?Leg to=to
 +
|?Leg transport=transport
 
|format=table
 
|format=table
 
|sort=Leg wp_num
 
|sort=Leg wp_num
Line 28: Line 33:
 
{{#var:leg_lines}}
 
{{#var:leg_lines}}
  
== Map ==
+
== LegMapLines ==
{{#display_map:
+
}}
|lines=
+
{{LegMapLines
{{#var:leg_lines}}
+
|lines={{#var:leg_lines}}
~{{{title|Legs}}}
+
|title={{{title|Legs}}}
~{{{subtitle|from subobjects}}}
+
|subtitle={{{subtitle|from subobjects}}}
~{{{color|blue}}}~0.42~10
+
|color={{{color|blue}}}
|center={{{center|Berlin}}}
+
|center={{{center|}}}
 
|zoom={{{zoom|12}}}
 
|zoom={{{zoom|12}}}
 
|width={{{width|800}}}
 
|width={{{width|800}}}
 
|height={{{height|600}}}
 
|height={{{height|600}}}
|fullscreen=on
+
|debug={{{debug|}}}
|service=leaflet}}
+
}}
 
</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}}