Template:Trail Map: Difference between revisions

From TEHCC Wiki
Jump to navigation Jump to search
No edit summary
m (Undo revision 11088 by Tim (talk))
Tag: Undo
 
(26 intermediate revisions by the same user not shown)
Line 3: Line 3:
It should be called in the following format:
It should be called in the following format:
<pre>
<pre>
{{Trail Map|Main Trail={{PAGENAME}}|Other Trails= }}
{{Trail Map|Main Trail={{PAGENAME}}|Other Trails= |Zoom Cancel=[any entry will trigger cancel]}}
</pre>
</pre>
Parameter Main Trail is optional and will default to the pagename. Optionally, additional trails can be requested to have the KML be shown by listing Trail page names separated by commas.
Parameter Main Trail is optional and will default to the pagename. Optionally, additional trails can be requested to have the KML be shown by listing Trail page names separated by commas. Lastly, the KML Rezoom command in the map can be overridden by defining anything to Zoom Cancel. Useful for maps where only part of the trail is mapped to not zoom on only it.


Future features could allow specifying map settings.
Future features could allow specifying map settings.
Line 15: Line 15:
-->{{#arraydefine:othertrailnames|{{{Other Trails|}}}}}<!--  
-->{{#arraydefine:othertrailnames|{{{Other Trails|}}}}}<!--  
-->{{#arraymerge:alltrailnames|maintrail|othertrailnames}}<!--  
-->{{#arraymerge:alltrailnames|maintrail|othertrailnames}}<!--  
-->{{#ask: [[{{#arrayprint:alltrailnames|{{!}}{{!}}}}]]
-->{{#ask: [[{{#arrayprint:alltrailnames|{{!}}{{!}}}}||Report:{{PAGENAME}}]]
| ?Has KML Link
| ?Has KML Link
| pagetitle = hide
| pagetitle = hide
Line 169: Line 169:
|[[Category:Map Markers]] [[-Has subobject::{{#arrayprint:alltrailnames|{{!}}{{!}}}}]] [[Is Marker Type::Blowdown]]
|[[Category:Map Markers]] [[-Has subobject::{{#arrayprint:alltrailnames|{{!}}{{!}}}}]] [[Is Marker Type::Blowdown]]
  ; icon = treedown.png
  ; icon = treedown.png
;?Has Marker Location
;?Has Marker Title
;?Has Marker Description
|[[Category:Map Markers]] [[-Has subobject::{{#arrayprint:alltrailnames|{{!}}{{!}}}}]] [[Is Marker Type::Station]]
; icon = Rangerstation.png
  ;?Has Marker Location
  ;?Has Marker Location
  ;?Has Marker Title
  ;?Has Marker Title
  ;?Has Marker Description
  ;?Has Marker Description
|format=googlemaps
|format=googlemaps
|kmlrezoom=yes
|kmlrezoom={{#if: {{{Zoom Cancel|}}}|no|yes}}
|type=terrain
|type=terrain
|types=satellite, hybrid, terrain
|types=satellite, hybrid, terrain
|width=auto
|width=auto
|height=600
|height=600
|link=none
|showtitle=no
|showtitle=no
|template=Map Balloon Template
|template=Map Balloon Template
|kml={{#arrayprint:KMLlinks|,|@@@@|{{#replace:@@@@|<nowiki> </nowiki>|_}}}}
|gkml={{#arraymap:{{#arrayprint:KMLlinks}}|,|@@@@|{{#replace:@@@@|<nowiki> </nowiki>|_}}|,}}
}}
}}
{{#if:{{filepath:{{#titleparts:{{#arrayprint:maintrail}}}}.kml}}|[{{filepath:{{#titleparts:{{#arrayprint:maintrail}}}}.kml}} Download KML] / [{{#replace:http://tehcc.org/clubwiki/index.php?title=Special:Upload&wpDestFile={{#arrayprint:maintrail}}.kml&wpForReUpload=1|<nowiki> </nowiki>|_}} Upload new version]|[[File:{{#titleparts:{{#arrayprint:maintrail}}}}.kml{{!}}Upload KML]]}}<br />
{{#if:{{filepath:{{#titleparts:{{#arrayprint:maintrail}}}}.kml}}|[{{filepath:{{#titleparts:{{#arrayprint:maintrail}}}}.kml}} Download KML] / [{{#replace:https://tehcc.org/clubwiki/index.php?title=Special:Upload&wpDestFile={{#arrayprint:maintrail}}.kml&wpForReUpload=1|<nowiki> </nowiki>|_}} Upload new version] / [[:File:{{#arrayprint:maintrail}}.kml|KML File Page]] / [{{Create Profile Link|KML={{filepath:{{#titleparts:{{#arrayprint:maintrail}}}}.kml}}|Title={{#arrayprint:maintrail}}}} Create Profile Chart] / [{{Create Map Link|KML={{filepath:{{#titleparts:{{#arrayprint:maintrail}}}}.kml}}}} gpsvisualizer Map]|[[File:{{#titleparts:{{#arrayprint:maintrail}}}}.kml{{!}}Upload KML]]}}<br /></includeonly>
XxX{{#replace:{{#arrayprint:KMLlinks}}|<nowiki> </nowiki>|_}}</includeonly>

Latest revision as of 13:30, 23 March 2023

This returns a map of the trails associated with the trail page it is called on.

It should be called in the following format:

{{Trail Map|Main Trail={{PAGENAME}}|Other Trails= |Zoom Cancel=[any entry will trigger cancel]}}

Parameter Main Trail is optional and will default to the pagename. Optionally, additional trails can be requested to have the KML be shown by listing Trail page names separated by commas. Lastly, the KML Rezoom command in the map can be overridden by defining anything to Zoom Cancel. Useful for maps where only part of the trail is mapped to not zoom on only it.

Future features could allow specifying map settings.

Edit the page to see the template text.