Extension:WikiSearchMapsLink
Release status: stable |
|
|---|---|
| Description | MediaWiki extension that creates a binding link between WikiSearch and Maps. |
| Author(s) | Bertrand Gorge (BertrandGorgetalk) |
| MediaWiki | 1.43+ |
| Licence | GNU General Public License 3.0 |
| Download | GitHub:
Note: https://github.com/neayi/WikiSearchMapsLink/blob/main/README.md |
| Example | https://wiki.tripleperformance.fr/wiki/Retours_d%27exp%C3%A9rience |
MediaWiki extension that creates a binding link between WikiSearch and Maps.
When you have both a map and a search engine, this extension allows you to synchronize both.
This extension has been developed for Triple Performance. Click on this link to see it in action!
Installation
[edit]Clone this repository to your MediaWiki extensions directory:
cd extensions/ git clone https://github.com/neayi/WikiSearchMapsLink.git
Add the following line to your LocalSettings.php:
wfLoadExtension( 'WikiSearchMapsLink' );
Navigate to Special:Version on your wiki to verify that the extension is successfully installed.
Usage
[edit]In order for the extension to work, you need to configure your map and your search engine:
Maps configuration
[edit]Assuming the map loads places based on a semantic query, you just need to add the ajaxcoordproperty setting to your map so that the WikiSearchMapsLink knows which is the property that holds the GPS coordinates (in our case a property called Coordinates).
{{#ask: [[Has country::Greece]][[Coordinates::+]]
| format=leaflet
| ajaxcoordproperty = Coordinates
| ?Coordinates
| limit=1000
}}
WikiSearch configuration
[edit]Then you need to add the property in the configuration of WikiSearch - note that it is a good idea to have the base query of WikiSearch match the semantic query of your map:
{{#WikiSearchConfig:
| base query=[[Has country::Greece]]
...
| ?Coordinates
}}
Once this setup done, you should be able to perform searchs in WikiSearch and see your map being updated dynamically.
