Release status: stable
|Description||Allows to add maps to pages as a frontend to mapping services|
|Author(s)||Yuri Astrakhan (yuriktalk)|
|Example||See below on this page|
|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 both display a map on the page.
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:
wfLoadExtension( 'Kartographer' );
- Configure as required.
- Done – Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
To users running MediaWiki 1.24 or earlier:
The instructions above describe the new way of installing this extension using
If you need to install this extension on these earlier versions (MediaWiki 1.24 and earlier), instead of
wfLoadExtension( 'Kartographer' );, you need to use:
|Enables Wikivoyage mode.|
|Allows Kartographer to extract CSS style to be used by the link from the GeoJSON.|
|Defines if the map will be a static image.|
|Enables the |
|Server providing the map tiles. The tile server at maps.wikimedia.org is not available to 3rd parties. See openstreetmap:Tile servers for tile servers.|
|Available map styles on $wgKartographerMapServer|
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:
$wgKartographerMapServer = 'https://tile.openstreetmap.fr';
$wgKartographerDfltStyle = 'osmfr';
- 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. wmflabs. 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.
Conflict with FlaggedRevsEdit
Because of technical issues, some Wikipedias that implement a specific setting of Extension:FlaggedRevs cannot show the mapframe tag.
|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.|