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 developped for Triple Performance. Click on this link to see it in action!
- MediaWiki 1.43 or later
-
Clone this repository to your MediaWiki
extensionsdirectory: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.
In order for the extension to work, you need to configure your map and your search engine:
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
}}
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.
This extension is licensed under the GNU General Public License v3.0 or later. See the LICENSE file for details.