Template:Attached KML

Lua error in Module:Attached_KML at line 224: attempt to index field 'wikibase' (a nil value).

Documentation icon Template documentation[view] [edit] [history] [purge]

This template displays links to the popular web mapping services Google and 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. Many of these already exist, and can be found through Wikidata.

Normal

{{Attached KML}}

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. This is best for the External links section.

Other options

{{Attached KML
|wikidata=
|from=
|display=
|header=
}}
  • To use a different article's KML file, specify the id (Q-number) of the other KML file's Wikidata item using:
    • |wikidata=Qnumber
  • To create a new KML file on this Wikipedia, create a page named like Template:Attached KML/Article title with the text of the KML file.
    • Or, create a page named like Template:Attached KML/Another title, and specify this file using:
      • |from=Another title
  • 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:
    • |display=inline - Only displays the box (you can forego this, as box-only is the default)
    • |display=title - Only displays the title links
    • |display=inline,title - Displays the box as well as title links
    • |display=title,inline - Same as above
  • Optional header:
    • |header= short text to appear at the top of the side box when using display=inline (end with <br /><nowiki /> to force a new line after the header)
    • default is no header in side box


This template is intended for the following items, which can be shown as lines on a map:

  • Walkways/paths
  • Roads
  • Rivers
  • Subway or train lines
  • Ship courses
  • Flight paths
  • Explorers journeys

and more...

Tracking categories

Pages with errors are tracked in Category:Attached KML errors (0 errors). For other tracking categories, see Category:Attached KML tracking categories.

TemplateData

<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) for both.",
   "type": "string",
   "default": "title,inline",
   "required": false
 },
 "header": {
   "label": "Header",
   "description": "Header to place on the Attached KML box",
   "type": "string",
   "required": false
 },
 "wikidata": {
   "label": "Use KML from this Wikidata item",
   "description": "The item id (Q-number) of the Wikidata item to use the KML from, if not the page the template is placed on.",
   "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": "string/wiki-page-name",
   "required": false
 }

}}</templatedata>

See also