Template:Attached KML/doc

This template displays links to the popular web mapping service Google (and previously Bing) on articles, and when coupled with the content of a KML file produces a route line on those maps. If the "KML file" offer is clicked on, a file index.php will be presented for download containing the KML content; such a file will be ignored by the Google Earth system unless renamed, to index.kml for example.

Usage
As KML files cannot currently be uploaded, the text of those files must be copied into a Wikipedia page:


 * Template:Attached KML/[Article Title]

KML files can also be stored on other wikis which are connected to Wikidata.

Normal
Simply placing the template in an article generates a box, as seen above - but using the article's related KML file (as found through Wikidata, if available). This is best placed in the External links section, or near the end of an article.

Other options

 * To use a different article's KML file, specify the id (Q-number) of the other KML file's Wikidata item using:
 * To create a new KML file on this Wikipedia, create a page named like  with the text of the KML file.
 * Or, to use KML from a local page named like, specify:
 * Using  is preferable as page moves won't cause errors
 * The links in the box can also be placed near the top right of an article title, similar to coordinates, by using one of the following options:
 * - Only displays the box (you can forego this, as box-only is the default)
 * - Only displays the title links
 * - Displays the box as well as title links
 * - Same as above
 * Optional header:
 * short text to appear at the top of the side box when using display=inline (end with  to force a new line after the header)
 * default is no header in side box
 * Use  to show a different title to show next to the top links (when using title display mode), if "Route map" is not suitable
 * default is no header in side box
 * Use  to show a different title to show next to the top links (when using title display mode), if "Route map" is not suitable

This template is intended for linear features: and can also be used for polygon features, to highlight an area within a boundary (parks, towns, etc.)
 * Rights-of-way
 * Walkways/paths
 * Roads
 * Rivers
 * Subway or train lines
 * Ship courses
 * Flight paths
 * Explorers journeys
 * and more...

Tracking categories
The following may be added via Module:Attached KML
 * – tracks errors: malformed_qid, bad_qid, no_item, bad_from, error_nokml
 * – tracks mainspace articles using KML from Wikidata
 * – tracks mainspace articles not using KML from Wikidata

TemplateData
{	"description": "A template to display the KML file attached to a page.", "params": { "display": { "label": "Display mode", "description": "Use \"title\" for display at the top, \"inline\" for the box (default), or both (separated by a comma: \"inline,title\") for both.", "type": "string", "default": "title,inline", "required": false, "suggested": true },		"header": { "label": "Header", "description": "Header to place on the Attached KML box", "type": "string", "required": false },		"from": { "label": "Use KML from this page", "description": "The page to use the KML from, if not the page the template is placed on.", "type": "wiki-page-name", "required": false },		"wikidata": { "label": "Use KML from this Wikidata item", "description": "The Wikidata item id (Q-number) for KML file to be used, if not the KML for this page", "example": "Q26267859" },		"title": { "label": "Title", "description": "Title to show next to links (when using title display mode) if \"Route map\" is not suitable", "example": "Tornado damage survey map", "default": "Route map" }	},	"format": "inline" }