These are the installation and configuration instructions for the Maps extension.
Table of contents
Maps is installed and upgraded via Composer. For a detailed explanation see installing MediaWiki extensions with Composer.
In short:
- Edit
composer.local.json
(preferred) orcomposer.json
by addingmediawiki/maps
to therequire
section - Choose the version constraint. Typically you want to pick
^x.y
, wherex.y
is the latest minor version of Maps receiving only backwards-compatible code changes - Run
composer update
orphp composer.phar update
depending on how you installed Composer.
For upgrading, simply edit the composer.local.json
or composer.json
and update the version constraint. Then run composer update
.
Example of a require
section just with Maps:
"require": {
"mediawiki/maps": "^5"
}
If you would also like to make use of the semantic functionality Maps provides you also need to install Semantic MediaWiki. In this case the example require
section with both Maps and Semantic MediaWiki looks like this:
"require": {
"mediawiki/maps": "^5",
"mediawiki/semantic-media-wiki": "^2.5"
}
You will need a comma behind each version constraint except the last one.
Verify installation success
As final step, you can verify Maps got installed by looking at the Special:Version page on your wiki and verifying the Maps extension is listed.
If you want to use the Semantic MediaWiki integration, you will also need to install Semantic MediaWiki.
Maps works out of the box without any configuration work being required. Below are some key configuration options that you might want to change. See the Maps settings file for all available configuration options.
Like in most MediaWiki extensions, configuration is done by placing small snippets of PHP code at the bottom of your wikis LocalSettings.php file.
The Maps extension supports displaying maps using multiple mapping services, including Google Maps, Leaflet and OpenLayers. At present the default is Leaflet, while in older versions of the extension it was Google Maps.
If you do not wish to use the default, use the $GLOBALS['egMapsDefaultService']
setting. Example:
For OpenLayers:
$GLOBALS['egMapsDefaultService'] = 'openlayers';
For Leaflet:
$GLOBALS['egMapsDefaultService'] = 'leaflet';
For Google Maps:
$GLOBALS['egMapsDefaultService'] = 'googlemaps3';
When using Google Maps, you will need to provide your Google API key.
$GLOBALS['egMapsGMaps3ApiKey'] = 'your-api-key';
The Maps extension supports geocoding,
the conversion of human readable addresses to coordinates. This is done via a webservice used for each
map displayed on your wiki. By default Maps uses Nominatim.
To use a different geocoding service, use the $GLOBALS['settingegMapsDefaultGeoService']
.
$GLOBALS['egMapsDefaultGeoService'] = 'google';
The PHP and MediaWiki version ranges listed are those in which Maps is known to work. It might also work with more recent versions of PHP and MediaWiki, though this is not guaranteed. Increases of minimum requirements are indicated in bold. For a detailed list of changes, see the release notes.
PHP | MediaWiki | Semantic MediaWiki | Release status | |
---|---|---|---|---|
Maps 5.7.x | 7.0 - 7.3+ | 1.27 - 1.31+ | 2.1 - 2.5 | Planned Q3 2018 |
Maps 5.6.x | 7.0 - 7.3 | 1.27 - 1.31 | 2.1 - 2.5 | Stable release |
Maps 5.5.x | 7.0 - 7.3 | 1.27 - 1.31 | 2.1 - 2.5 | Obsolete release, no support |
Maps 5.4.x | 7.0 - 7.3 | 1.27 - 1.31 | 2.1 - 2.5 | Obsolete release, no support |
Maps 5.3.x | 7.0 - 7.2 | 1.27 - 1.30 | 2.1 - 2.5 | Obsolete release, no support |
Maps 5.2.x | 7.0 - 7.2 | 1.27 - 1.30 | 2.1 - 2.5 | Obsolete release, no support |
Maps 5.1.x | 7.0 - 7.2 | 1.27 - 1.30 | 2.1 - 2.5 | Obsolete release, no support |
Maps 5.0.x | 5.6 - 7.1 | 1.27 - 1.30 | 2.1 - 2.5 | Obsolete release, no support |
Maps 4.4.x | 5.6 - 7.1 | 1.27 - 1.29 | 2.1 - 2.5 | Obsolete release, no support |
Maps 4.3.x | 5.6 - 7.1 | 1.27 - 1.29 | 2.1 - 2.5 | Obsolete release, no support |
Maps 4.2.x | 5.5 - 7.1 | 1.23 - 1.29 | 2.1 - 2.5 | Obsolete release, no support |
Maps 4.1.x | 5.5 - 7.1 | 1.23 - 1.28 | 2.1 - 2.5 | Obsolete release, no support |
Maps 4.0.x | 5.5 - 7.0 | 1.23 - 1.28 | 2.1 - 2.4 | Obsolete release, no support |
Older obsolete versions:
PHP | MediaWiki | Composer | Validator | |
---|---|---|---|---|
Maps 3.8.x | 5.5 - 7.0 | 1.23 - 1.27 | Required | Handled by Composer |
Maps 3.7.x | 5.5 - 7.0 | 1.23 - 1.27 | Required | Handled by Composer |
Maps 3.6.x | 5.5 - 7.0 | 1.23 - 1.27 | Required | Handled by Composer |
Maps 3.5.x | 5.3.2 - 7.0 | 1.18 - 1.27 | Required | Handled by Composer |
Maps 3.4.x | 5.3.2 - 7.0 | 1.18 - 1.27 | Required | Handled by Composer |
Maps 3.3.x | 5.3.2 - 5.6.x | 1.18 - 1.25 | Required | Handled by Composer |
Maps 3.2.x | 5.3.2 - 5.6.x | 1.18 - 1.24 | Required | Handled by Composer |
Maps 3.1.x | 5.3.2 - 5.6.x | 1.18 - 1.24 | Required | Handled by Composer |
Maps 3.0.x | 5.3.2 - 5.6.x | 1.18 - 1.23 | Required | Handled by Composer |
Maps 2.0.x | 5.3.2 - 5.5.x | 1.18 - 1.23 | Not supported | 0.5.1 |
Maps 1.0.5 | 5.2.0 - 5.3.x | 1.17 - 1.19 | Not supported | 0.4.13 or 0.4.14 |
All current versions of Maps have full support for all databases that can be used with MediaWiki.