![]() Release status: stable | |
---|---|
![]() | |
Implementation | Tag |
Description | Allows to add maps to pages as a frontend tomapping services |
Author(s) | Yuri Astrakhan (yuriktalk) |
Compatibility policy | Snapshots releases along with MediaWiki. Master is not backward compatible. |
MediaWiki | 1.39+ |
Database changes | No |
License | MIT License |
Download | |
Help | Help:Extension:Kartographer |
Example | See below on this page |
| |
| |
Quarterly downloads | 48 (Ranked 68th) |
Public wikis using | 898 (Ranked 289th) |
Translate the Kartographer extension if it is available at translatewiki.net | |
Issues | Open tasks ·Report a bug |
TheKartographer extension lets you display maps (based aroundOpenStreetMap) 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<mapframe>...</mapframe>
and<maplink>
, which display a map and a link to a map on the page respectively.SeeHelp:Extension:Kartographer for how to call these tags.
Kartographer
folder to yourextensions/
directory.cd extensions/
git clone https://gerrit.wikimedia.org/r/mediawiki/extensions/Kartographer
composer install --no-dev
in the extension directory.(SeeT173141 for potential complications.)wfLoadExtension('Kartographer');
parameter | default | comment |
---|---|---|
$wgKartographerMapServer | null | 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 serverhttps://maps.wikimedia.org can't be used outside of the Wikimedia cluster. Seeopenstreetmap:Tile servers for tile servers. |
$wgKartographerStyles | ["osm-intl","osm"] | Available map styles users can request from your $wgKartographerMapServer viamapstyle="…" . |
$wgKartographerDfltStyle | "osm-intl" | Default map style to be used. Must be one of the values from $wgKartographerStyles. |
$wgKartographerSrcsetScales | [1.3,1.5,2,2.6,3] | Set of allowed high-DPI pixelratios supported by your $wgKartographerMapServer, to be used in<img srcset="…"> and $wgKartographerMapServer URLs. Must be in incremental order. Doesn't need to start with 1, this happens automatically. Note that most tile servers don't support this at all and thus require setting this to an empty array. |
$wgKartographerUseMarkerStyle | false | Allows Kartographer to extract marker styles from the GeoJSON to style a<maplink> accordingly. Currently only themarker-color is considered. |
$wgKartographerWikivoyageMode | false | Enables the group feature where different<maplink> and<mapframe> tags can access each others data viagroup="…" andshow="…" attributes. SeeGroups. Disabled by default. Meant to be enabled onWikivoyage. |
$wgKartographerStaticMapframe | false | Disables the module that turns<mapframe> tags into interactive mini-maps that can be panned and zoomed without leaving the page. Static maps are recommended on high-traffic wikis where your KartographerMapServer couldn't keep up. Clicking<maplink> and<mapframe> tags to open a fullscreen interactive map is always possible. Requires a static map renderer likeKartotherian. |
$wg KartographerStaticFullWidth | 1024 | The actual width of static map images when a<mapframe> uses the special valuewidth="full" . Relevant on wikis in static mode or when JavaScript is disabled. It's recommended to use one of the $wgImageLimits widths for consistency. |
$wgKartographerUsePageLanguage | true | 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. |
$wgKartographerFallbackZoom | 13 | Fallback zoom value when nozoom="…" is given. Must be an integer between 0 (map shows the entire earth) and 19 (as close as possible). Currently only works with dynamic maps. |
$wgKartographerSimpleStyleMarkers | true | 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:
For more information on these, seeWikimedia Maps.
For more information on the production aspects of running these services, see theWikitech Maps page.
Wikivoyage tends to have a large number of POIs listed on a page[1] (seeexample).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:
See the corresponding project(s) inPhabricator for acomplete list of bugs.
![]() | This extension is being used on one or moreWikimedia 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'sCommonSettings.php andInitialiseSettings.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'sSpecial:Version page. |
![]() | This extension is included in the following wiki farms/hosts and/or packages:This is not an authoritative list.Some wiki farms/hosts and/or packages may contain this extension even if they are not listed here.Always check with your wiki farms/hosts or bundle to confirm. |