Release status: stable
|Description||Allows to add maps to pages as a frontend to mapping services|
|Author(s)||Yuri Astrakhan (yuriktalk)|
|Compatibility policy||Snapshots releases along with MediaWiki. Master is not backward compatible.|
|Example||See below on this page|
|Quarterly downloads||98 (Ranked 82nd)|
|Public wikis using||898 (Ranked 289th)|
|Translate the Kartographer extension if it is available at translatewiki.net|
|Issues||Open tasks · Report a bug|
The Kartographer extension lets you display maps (based around OpenStreetMap) in wiki pages. It was specifically designed in order to run on Wikimedia sites such as Wikivoyage and Wikipedia, although it can be used on any wiki.
Kartographer defines the wikitext tags
<maplink>, which display a map and a link to a map on the page respectively.
See Help:Extension:Kartographer for how to call these tags.
- Install the JsonConfig extension as described in its documentation which is required to run this extension.
- Download and place the file(s) in a directory called
- Only when installing from Git, run Composer to install PHP dependencies, by issuing
composer install --no-devin the extension directory. (See task T173141 for potential complications.)
- Add the following code at the bottom of your LocalSettings.php file:
wfLoadExtension( 'Kartographer' );
- Configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
|Server providing the map tiles. This is the only setting that doesn't have a default. You must provide a value. Note that the Wikimedia tile server https://maps.wikimedia.org can't be used outside of the Wikimedia cluster. See openstreetmap:Tile servers for tile servers.|
|Available map styles users can request from your $wgKartographerMapServer via |
|Default map style to be used. Must be one of the values from $wgKartographerStyles.|
[ 1.3, 1.5, 2, 2.6, 3 ]
|Set of allowed high-DPI pixelratios supported by your $wgKartographerMapServer, to be used in |
|Allows Kartographer to extract marker styles from the GeoJSON to style a |
|Enables the group feature where different |
|Disables the module that turns |
|Use the language of the page instead of that of the language of the territory mapped. This sets the lang parameter of the tiles requested.|
|Fallback zoom value when no |
|Use an api to generate markers using the simplestyle-spec for features. Should be set to false for most applications outside WMF. Otherwise images of markers are assumed to be hosted on the map server.|
This extension provides two internal APIs.
Kartographer makes use of a suite of open-source, open-data tools for displaying maps:
- On the client side (within the browser):
- On the server side:
- Generating the data in advance:
- A simple method to insert a map into an article without requiring common.js code changes
- Ability to add extra information (marks, area, popups, text, links) to the map
- Ability to gather map usage statistics (KPI) to better gauge how and what should be improved.
- TBD: experimentation - if the user is aware of the privacy implications, the map should be able to show external data from non-production source, e.g. Static, server-side rendered images will not include the extra data added via this method until the extra data source is hosted in the secure production environment and can be shown without the user action.
Wikivoyage tends to have a large number of points of interest (POIs), such as museums and restaurants, listed on a page (see example and scroll down to the "See" section). Each POI is usually added with a template, but all of them should appear on the same map. Also, each POI should be referable by showing an icon with a number, both in the text of the article, and on the map:
- Ability to incrementally add features to the map. For example, each usage of the restaurant template adds a single POI, and the map shows all of them.
- Added features need to be indexable. E.g. the first restaurant template would show  on the page, and map would show POI as a clickable  element. There could be multiple index counters at the same time, each for its own type of POIs.
|This extension is being used on one or more Wikimedia projects. This probably means that the extension is stable and works well enough to be used by such high-traffic websites. Look for this extension's name in Wikimedia's CommonSettings.php and InitialiseSettings.php configuration files to see where it's installed. A full list of the extensions installed on a particular wiki can be seen on the wiki's Special:Version page.|
|This extension is included in the following wiki farms/hosts and/or packages:|