Difference between revisions of "Template:LegMap"

From BITPlan E-Bike Wiki
Jump to navigation Jump to search
 
(44 intermediate revisions by the same user not shown)
Line 6: Line 6:
 
|zoom=12}}</pre>
 
|zoom=12}}</pre>
 
[[Category:Template]]
 
[[Category:Template]]
</noinclude>
+
</noinclude><includeonly>
<includeonly>
+
{{#vardefine:leg_lines|{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[IsA::Leg]]
{{#ask: [[-Has subobject::{{FULLPAGENAME}}]][[Leg from::+]]
+
|mainlabel=-
|?Leg from
+
|?Leg from=from
|?Leg to
+
|?Leg to=to
 
|format=template
 
|format=template
 
|template=LegLine
 
|template=LegLine
|sep=;}}
+
|sort=Leg wp_num
{{#display_map:
+
|named args=yes
|lines={{#ask: [[-Has subobject::{{FULLPAGENAME}}]][[Leg from::+]]
+
|sep=:
|?Leg from
+
}}}}
|?Leg to
+
== Lines ==
|format=template
+
{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[Leg_from::+]]
|template=LegLine
+
|mainlabel=-
|sep=;}}
+
|?Leg wp_num=#
|center={{{center|Berlin}}}
+
|?Leg from=from
 +
|?Leg to=to
 +
|format=table
 +
|sort=Leg wp_num
 +
}}
 +
{{#var:leg_lines}}
 +
 
 +
== LegMapLines ==
 +
{{LegMapLines
 +
|lines={{#var:leg_lines}}
 +
|title={{{title|Legs}}}
 +
|subtitle={{{subtitle|from subobjects}}}
 +
|color={{{color|blue}}}
 +
|center={{{center|}}}
 
|zoom={{{zoom|12}}}
 
|zoom={{{zoom|12}}}
|height=700
+
|width={{{width|800}}}
|service=leaflet}}
+
|height={{{height|600}}}
 +
}}
 
</includeonly>
 
</includeonly>

Latest revision as of 07:25, 28 November 2024

Template to display leg routes on OpenStreetMap.

Usage

{{LegMap
|center=cityName
|zoom=12}}