Embed Maps

From WikiMLT
Revision as of 21:45, 27 September 2022 by Spas (talk | contribs) (→‎Installation)

Exension:Maps

In­stal­la­tion

If you are us­ing Me­di­aWi­ki 1.35 or lat­er and PHP 7.4 or lat­er, run the fol­low­ing two com­mands.

IP="/var/www/wiki.example.com"
OWNER="www-data"
cd "$IP"
sudo -u "$OENER" COMPOSER=composer.local.json composer require --no-update mediawiki/maps:~9.0
sudo -u "$OENER" composer update mediawiki/maps --no-dev -o
sudo nano "${IP}/LocalSettings.php"
/**
 * Extension:Maps, https://maps.extension.wiki/wiki/Installation
 */
wfLoadExtension( 'Maps' );

For more de­tails and ow to use Google maps in­stead of Leaflet maps read the in­stal­la­tion man­u­al.

Us­age sam­ples

For more de­tails read the the doc­u­men­ta­tion pro­vid­ed at the Maps for MediaWiki's home­page.

Sofia

{{#display_map: center=Sofia, Bulgaria | geojson=Sofia}}

{{#display_map:center=Sofia, Bul­gar­ia| geojson=Sofia}}

Berlin

Ref­er­ences