Difference between revisions of "Template:LegMap"

From BITPlan E-Bike Wiki
Jump to navigation Jump to search
 
(32 intermediate revisions by the same user not shown)
Line 7: Line 7:
 
[[Category:Template]]
 
[[Category:Template]]
 
</noinclude><includeonly>
 
</noinclude><includeonly>
{{#ask:[[-Has subobject::{{FULLPAGENAME}}]] [[Leg from::+]][[Leg to::+]]
+
{{#vardefine:leg_lines|{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[IsA::Leg]]
 
|mainlabel=-
 
|mainlabel=-
|?Leg from#coordinates=from
+
|?Leg from=from
|?Leg to#coordinates=to
+
|?Leg to=to
 
|format=template
 
|format=template
 
|template=LegLine
 
|template=LegLine
 +
|sort=Leg wp_num
 
|named args=yes
 
|named args=yes
 +
|sep=:
 +
}}}}
 +
== Lines ==
 +
{{#ask:[[-Has subobject::{{FULLPAGENAME}}]][[Leg_from::+]]
 +
|mainlabel=-
 +
|?Leg wp_num=#
 +
|?Leg from=from
 +
|?Leg to=to
 +
|format=table
 +
|sort=Leg wp_num
 
}}
 
}}
{{#display_map:
+
{{#var:leg_lines}}
|lines={{#ask: [[-Has subobject::{{FULLPAGENAME}}]][[Leg from::+]][[Leg to::+]]
+
 
|mainlabel=-
+
== LegMapLines ==
|?Leg from#coordinates=from
+
{{LegMapLines
|?Leg to#coordinates=to
+
|lines={{#var:leg_lines}}
|format=template
+
|title={{{title|Legs}}}
|template=LegLine
+
|subtitle={{{subtitle|from subobjects}}}
|named args=yes
+
|color={{{color|blue}}}
|sep=:}}
+
|center={{{center|}}}
|center={{{center|Berlin}}}
 
 
|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}}