Template:Park trail map: Difference between revisions
Jump to navigation
Jump to search
Convert to use arrays for parkname |
m add pressees around legacy part |
||
| (32 intermediate revisions by the same user not shown) | |||
| Line 5: | Line 5: | ||
It should be called in the following format: | It should be called in the following format: | ||
<pre> | <pre> | ||
{{Park trail map|Park={{PAGENAME}}}} | {{Park trail map|Park={{PAGENAME}}|Zoom=<nothing will kmlrezoom, number will zoom to that level}} | ||
</pre> | </pre> | ||
Edit the page to see the template text. | Edit the page to see the template text. | ||
| Line 12: | Line 12: | ||
[[Category:Park Class Items]] | [[Category:Park Class Items]] | ||
</noinclude><includeonly>{{#arraydefine:parkname|{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}}}}}}{{#compound_query:[[Category: | </noinclude><includeonly>{{#arraydefine:parkname|{{#if: {{{Park|}}}|{{{Park|}}}|{{PAGENAME}}}}}}{{#compound_query:[[Category:Parks]] [[{{#arrayprint:parkname}}]] | ||
;icon=MarkerA.png | |||
;?Main Location | |||
;?Park Type | |||
;?Park Website | |||
|[[Category:Trails]] [[Park::{{#arrayprint:parkname}}]] | |||
;icon=MarkerT.png | ;icon=MarkerT.png | ||
;?Trailhead location | ;?Trailhead location | ||
| Line 170: | Line 175: | ||
;?Has Marker Title | ;?Has Marker Title | ||
;?Has Marker Description | ;?Has Marker Description | ||
|format= | |[[Category:Map Markers]] [[-Has subobject::{{#arrayprint:parkname}}]] [[Is Marker Type::Ranger Station]] | ||
; icon = Rangerstation.png | |||
;?Has Marker Location | |||
;?Has Marker Title | |||
;?Has Marker Description | |||
|format=leaflet | |||
|zoom={{{Zoom|}}} | |||
|layers=OpenTopoMap, OpenStreetMap | |||
|width=auto | |width=auto | ||
|height=600 | |height=600 | ||
|template=Map Balloon Template | |template=Map Balloon Template | ||
| | |geojson=GeoJson:{{#titleparts:{{#arrayprint:parkname}}}} | ||
}} | }} | ||
{{#if:{{filepath:{{#titleparts:{{#arrayprint:parkname}}}}.kml}}|[{{filepath:{{#titleparts:{{#arrayprint:parkname}}}}.kml}} Download KML] | [[GeoJson:{{#titleparts:{{#arrayprint:parkname}}}}| GeoJson Page]]{{#if:{{filepath:{{#titleparts:{{#arrayprint:parkname}}}}.kml}}| / Legacy: ([{{filepath:{{#titleparts:{{#arrayprint:parkname}}}}.kml}} Download KML] / [[:File:{{#titleparts:{{#arrayprint:parkname}}}}.kml|KML File Page]]}})</includeonly> | ||
Latest revision as of 14:01, 27 November 2026
This returns a map of the trails associated with the park page it is called on.
More specifically, it maps the coordinates in Property:Trailhead location from the pages with Category:Trails and the property Park set to the page name or other passed page name.
It should be called in the following format:
{{Park trail map|Park={{PAGENAME}}|Zoom=<nothing will kmlrezoom, number will zoom to that level}}
Edit the page to see the template text.
The template is too detailed to show an example. See Warriors' Path State Park map for an example.