![](/search.png)
Template:Attached KML
![]() | This 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: |
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.
![](/banners/4982a977a07323b21ed2c0909ecf59ae.png)
Usage
As KML files cannot currently be uploaded, the text of those files must be copied into a Wik.ipedia.Pro page:
![](/banners/78072c1a24fe4a02f7089cf3a671ef2c.png)
- Template:Attached KML/[Article Title]
KML files can also be stored on other wikis which are connected to Wikidata.
![](/banners/d7521f9732ff18d8aef6bec31e8fa60b.jpg)
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.
![](/banners/758d9b2c97c883c836a68f48ad7f5708.png)
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 Wik.ipedia.Pro, 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
- Or, to use KML from a local page named like
- 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:
![](/banners/1e8569e2724af9118c927ea1c1689780.png)
- 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.)
![](/banners/cb72955454927b4638f516e5c3b9bb53.png)
Tracking categories
The following may be added via Module:Attached KML
![](/banners/da3eddb49d122803eb93c7b90f75d92a.png)
- Category:Attached KML errors (5) – tracks errors: malformed_qid, bad_qid, no_item, bad_from, error_nokml
- Category:Articles using KML from Wikidata (9,470) – tracks mainspace articles using KML from Wikidata
- Category:Articles using KML not from Wikidata (4,328) – 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
- Wik.ipedia.Pro:Map data – for attaching Geojson map data that is not suitable for Commons (i.e. non-CC0).
TemplateData
TemplateData for Attached KML
![](/banners/ce326c2253387b2eb4f2cef8008c076c.png)
A template to display the KML file attached to a page.
![](/banners/bceb77edc7929455348548a1715dc450.png)
Parameter | Description | Type | Status | |
---|---|---|---|---|
Display mode | display | Use "title" for display at the top, "inline" for the box (default), or both (separated by a comma: "inline,title") for both.
| String | suggested |
Header | header | Header to place on the Attached KML box | String | optional |
Use KML from this page | from | The page to use the KML from, if not the page the template is placed on. | Page name | optional |
Use KML from this Wikidata item | wikidata | The Wikidata item id (Q-number) for KML file to be used, if not the KML for this page
| Unknown | optional |
Title | title | Title to show next to links (when using title display mode) if "Route map" is not suitable
| Unknown | optional |
See what we do next...
OR
By submitting your email or phone number, you're giving mschf permission to send you email and/or recurring marketing texts. Data rates may apply. Text stop to cancel, help for help.
Success: You're subscribed now !