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||124 (Ranked 76th)|
|Public wikis using||1,040 (Ranked 246th)|
|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
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:
|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:
$wgKartographerMapServer = 'https://tiles.wmflabs.org'; $wgKartographerDfltStyle = 'hikebike'; $wgKartographerSrcsetScales = ; /* Because no support for HiDPI tiles */
- 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.
|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 packages and/or wiki farms:|