KML files
This page is about KML files and their usage in MediaWiki and Wikimedia projects. See the links below for further information on the usage or discussions of KML files.
Wikimedia projects uses a variety of multimedia files to enhance content and explain concepts that are difficult to convey via text alone. Keyhole Markup Language (KML) files specify a set of features that can be displayed in compatible mapping or geospatial software, including web mapping services. KML files commonly accompany pages related to linear features such as roads, train lines, flight paths, and more.
Currently, Keyhole Markup Language (Q79587) files cannot be uploaded to Wikimedia Commons (Q565), or any other wiki (see Phab:T28059). As a work-around, the contents of KML file are stored as wikitext on a subpage of template Template:Attached KML (Q6690822). That template is used to generate links in an article to download the file, or view on a web-based mapping provider, using the raw version of the subpage containing the KML.
Content wikis (Wikipedias, etc)
[edit]- Wikis using KML have a Template:Attached KML (Q6690822) template
- KML files are stored as wikitext in subpages of Template:Attached KML (Q6690822) template
- URLs to actual, working KML files can be retrieved using action=raw; these URLs may be passed through to other websites, e.g. Bing maps or Google maps
- Pre-Wikidata setup: Template:Attached KML (Q6690822) template retrieves URL for the KML file using
{{PAGENAME}}
magic word, or from an optional parameter (allows one page's KML file to be used on another page) - Post-Wikidata setup: Template:Attached KML (Q6690822) template uses Module:Attached KML (Q26689774) to retrieve raw URL from Wikidata (see § Wikidata)
- Setup instructions: See documentation of w:en:Module:Attached KML (in English, translated instructions may or may not be available through interwiki links)
- KML files are shown in WikiMiniAtlas
- Help pages (English Wikipedia):
Commons
[edit]- c:Commons:Geocoding/Overlay – uses KML files to overlay images onto a map
Wikidata
[edit]- Items for KML files (remember, these are wikitext in a template subpage):
- have statement instance of (P31) → Wikimedia KML file (Q26267864)
- URLs to actual, working KML files can be retrieved using by converting sitelinks into raw URLs
- Items for pages with a related KML file:
- have statement KML file (P3096) → <KML item>
- Other relevant items:
- Other pages:
Non-content wikis and sites
[edit]Phabricator
[edit]- Main task: phab:T28059 "Add support for KML/KMZ filetype"
- Related:
- phab:T57549 "[Story] Add a new datatype for geoshapes"
- phab:T144152 "Show KML files on maps"
- T216601: Allow download of Wikidata query results in GPS-friendly format(s)
Meta
[edit]- 2016 Community Wishlist Survey/Categories/Multimedia#Support KML files
- 2015 Community Wishlist Survey/Commons#Support KML files in Commons (ranked #34 out of 107)
MediaWiki
[edit]External links
[edit]- Official Google Documentation
- KML file creation:
Bots
[edit]Future
[edit]Discuss future plans, goals, ideas, etc. on the talk page.