• Home
  • Random
  • Nearby
  • Log in
  • Settings
Donate Now If Wikipedia is useful to you, please give today.
  • About Wikipedia
  • Disclaimers
Wikipedia

Template:Attached KML

  • Template
  • Talk
  • Language
  • Watch
  • View source
KML file (edit • help)
Template:Attached KML/Attached KML
Template documentation[view] [edit] [history] [purge]
WarningThis template is used on approximately 14,000 pages and changes may be widely noticed. Test changes in the template's /sandbox or /testcases subpages, or in your own user subpage. Consider discussing changes on the talk page before implementing them.
This template uses Lua:
  • Module:Attached KML (sandbox)
This template tracks and uses Wikidata property:
  • KML file (P3096) (see uses)

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.

Contents

  • 1 Usage
    • 1.1 Normal
    • 1.2 Other options
  • 2 Tracking categories
  • 3 See also
  • 4 TemplateData

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

{{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, if available). This is best placed in the External links section, or near the end of an article.

Other options

{{Attached KML
|wikidata=
|from=
|display=
|header=
|title=
}}
  • 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, to use KML from a local page named like Template:Attached KML/Another title, specify:
      • |from=Another title
      • Using |wikidata= 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:
    • |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
    • Use |title= 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:

  • Rights-of-way
  • Walkways/paths
  • Roads
  • Rivers
  • Subway or train lines
  • Ship courses
  • Flight paths
  • Explorers journeys
  • and more...

and can also be used for polygon features, to highlight an area within a boundary (parks, towns, etc.)

Tracking categories

The following may be added via Module:Attached KML

  • Category:Attached KML errors (5) – tracks errors: malformed_qid, bad_qid, no_item, bad_from, error_nokml
  • Category:Articles using KML from Wikidata (9,453) – tracks mainspace articles using KML from Wikidata
  • Category:Articles using KML not from Wikidata (4,390) – tracks mainspace articles not using KML from Wikidata

See also

  • List of Attached KML subpages
  • Tutorial on creating a KML file
  • Help:Attached KML – help for readers
  • Meta:KML files
  • Wikipedia:Map data – for attaching Geojson map data that is not suitable for Commons (i.e. non-CC0).

TemplateData

This is the TemplateData for this template used by TemplateWizard, VisualEditor and other tools. See a monthly parameter usage report for Template:Attached KML in articles based on its TemplateData.

TemplateData for Attached KML

A template to display the KML file attached to a page.

Template parameters[Edit template data]

This template prefers inline formatting of parameters.

ParameterDescriptionTypeStatus
Display modedisplay

Use "title" for display at the top, "inline" for the box (default), or both (separated by a comma: "inline,title") for both.

Default
title,inline
Stringsuggested
Headerheader

Header to place on the Attached KML box

Stringoptional
Use KML from this pagefrom

The page to use the KML from, if not the page the template is placed on.

Page nameoptional
Use KML from this Wikidata itemwikidata

The Wikidata item id (Q-number) for KML file to be used, if not the KML for this page

Example
Q26267859
Unknownoptional
Titletitle

Title to show next to links (when using title display mode) if "Route map" is not suitable

Default
Route map
Example
Tornado damage survey map
Unknownoptional
The above documentation is transcluded from Template:Attached KML/doc. (edit | history)
Editors can experiment in this template's sandbox (edit | diff) and testcases (edit) pages.
Add categories to the /doc subpage. Subpages of this template.
Retrieved from "https://en.wikipedia.org/w/index.php?title=Template:Attached_KML&oldid=737962184"
Last edited on 6 September 2016, at 02:55

Languages

    • العربية
    • বাংলা
    • भोजपुरी
    • Cebuano
    • Čeština
    • فارسی
    • Français
    • 한국어
    • Հայերեն
    • Bahasa Indonesia
    • Magyar
    • മലയാളം
    • मराठी
    • Bahasa Melayu
    • 日本語
    • Oʻzbekcha / ўзбекча
    • ਪੰਜਾਬੀ
    • Română
    • Scots
    • Simple English
    • سنڌي
    • Svenska
    • Tagalog
    • తెలుగు
    • ไทย
    • Tiếng Việt
    • 粵語
    • 中文
    Wikipedia
    • Wikimedia Foundation
    • Powered by MediaWiki
    • This page was last edited on 6 September 2016, at 02:55 (UTC).
    • Content is available under CC BY-SA 4.0 unless otherwise noted.
    • Privacy policy
    • About Wikipedia
    • Disclaimers
    • Contact Wikipedia
    • Code of Conduct
    • Developers
    • Statistics
    • Cookie statement
    • Terms of Use
    • Desktop