Configuration: Difference between revisions

From Maps for MediaWiki
(Created page with "You can find a list of all configuration settings supported by maps in the [https://github.com/JeroenDeDauw/Maps/blob/master/DefaultSettings.php "DefaultSettings.php" file] ("...")
 
mNo edit summary
Line 1: Line 1:
You can find a list of all configuration settings supported by maps in the [https://github.com/JeroenDeDauw/Maps/blob/master/DefaultSettings.php "DefaultSettings.php" file] ("Maps_Settings.php" until Maps 6.3.0). To see which configuration settings are supported by the version of Maps you have, look in its "DefaultSettings.php" file, which can be found in the root directory.
The default configuration of the Maps extension are fine for most wikis. There is no required configuration that needs to be done after installation.


If you are not familiar with MediaWiki configuration, consult the [https://www.mediawiki.org/wiki/Manual:LocalSettings.php "LocalSettings.php" manual]. Do not edit "DefaultSettings.php" directly, as this will likely cause problems when you upgrade.
You can configure Maps via the <code>LocalSettings.php</code> file in your wikis root directory. If you are not familiar with this file, please have a look at [https://www.mediawiki.org/wiki/Manual:LocalSettings.php MediaWikis "LocalSettings.php" manual].


As of version 6.0 of Maps you will need to load the Maps_Settings.php file ('''not''' DefaultSettings.php) before changing the default settings. Example section in your "LocalSettings.php" file:
== Configuration Example ==


<syntaxhighlight lang="php">
<syntaxhighlight lang="php">
wfLoadExtension( 'Maps' );
wfLoadExtension( 'Maps' );
require_once __DIR__ . '/extensions/Maps/Maps_Settings.php';
$egMapsDefaultService = 'leaflet';
$egMapsDefaultService = 'leaflet';
$egMapsMapWidth = 500;
$egMapsMapWidth = 500;
</syntaxhighlight>
</syntaxhighlight>
== Supported Configuration ==
You can find a list of all configuration settings supported by the latest version of Maps in the [https://github.com/JeroenDeDauw/Maps/blob/master/DefaultSettings.php "DefaultSettings.php" file].
If you are using an older version of Maps, you can view the configuration settings supported in that version by looking at the "DefaultSettings.php" file of your wiki. You can find it in at <code>extensions/Maps/DefaultSettings.php</code>. If this file does not exist, look for <code>Maps_Settings.php</code> instead.

Revision as of 14:00, 5 May 2020

The default configuration of the Maps extension are fine for most wikis. There is no required configuration that needs to be done after installation.

You can configure Maps via the LocalSettings.php file in your wikis root directory. If you are not familiar with this file, please have a look at MediaWikis "LocalSettings.php" manual.

Configuration Example

wfLoadExtension( 'Maps' );
$egMapsDefaultService = 'leaflet';
$egMapsMapWidth = 500;

Supported Configuration

You can find a list of all configuration settings supported by the latest version of Maps in the "DefaultSettings.php" file.

If you are using an older version of Maps, you can view the configuration settings supported in that version by looking at the "DefaultSettings.php" file of your wiki. You can find it in at extensions/Maps/DefaultSettings.php. If this file does not exist, look for Maps_Settings.php instead.