Maps/Installation

Maps is installed and upgraded via Composer. For a detailed explanation see installing MediaWiki extensions with Composer.

In short:


 * Edit the "composer.local.json" file by adding  to the   section
 * Choose the version constraint. Typically you want to pick, where   is the latest minor version of Maps receiving only backwards-compatible code changes
 * Run  in the MediaWiki root directory

For upgrading, edit the "composer.local.json" file and update the version constraint.

Example of a  section just with Maps:

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  section with both Maps and Semantic MediaWiki looks like this:

You will need a comma behind each version constraint except the last one.

Then run.

As of Maps version 6.0, you need to load the extension in your "LocalSettings.php" file. This is done using the standard MediaWiki extension loading method:

This is an example of what your "LocalSettings.php" file might look like:

This is an example of a "LocalSettings.php" file with both Maps and Semantic MediaWiki:

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.

Configuration
Maps works out of the box without any configuration work being required. Below are some key configuration options that you might want to change. For a comprehensive overview of all settings, see Maps Configuration.

Mapping service
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  configuration parameter. Examples:


 * For Google Maps:
 * For Leaflet:

When using Google Maps, you will need to provide your Google API key:

Geocoding service
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.

Upgrading
When upgrading from Maps older than 6.0 to Maps 6.0 or later, you will need to load Maps in your "LocalSettings.php" file. This is done using the standard MediaWiki extension activation method. If you are using customized settings, you will also need to include the default settings. See the configuration instructions. See the examples shown above for installing this extension.

Platform compatibility
See the compatibility table on GitHub.