i’m looking for a convenient way to create a map of all articles within my mediaWiki and display it via Google Maps or Open Street Map. Currently i am using Template:Coordinate from Wikipedia to tag articles.
I’ve seen that Wikipedia does map creation via templates like Template:GeoGroup. At least in the german version i figured out that they are doing this by having the toolserver lookup the coords from wikipedia.
I followed this approach but since i’m new to mediaWiki, i couldn’t figure out how to use their Toolserver for myself.
A second approach i thought about was creating a KML-File on the fly using the extension KMLExport and pass it to Google Maps, which is possible by providing a url of the file.
Problem here: The extension won’t create any valid XML output, instead i receive an error:
Call to undefined function wfOpenElement() in mediawiki\extensions\KMLExport\KMLClasses.php
Which i think has to do with an old php version used, since the project is discontinued (latest version 2008-10-19).
I’ve been an application programmer for the last few years using C and many of its derivates, so php isn’t my time to shine. My guess could be completely wrong.
I appreciate any help on how to create and link to a map with a layer containing locations of articles in a custom mediaWiki.
Thanks
This might not be exactly what you’re looking for but we (Wikia) have a map view of all tagged articles implemented as an extension.
Here’s a link to the page displayed on a wiki:
http://supernatural.wikia.com/wiki/Special:Places
Click on a pin to go to a tagged article (we’re using a parser hook to do the tagging).
And here’s the source code (GPL-licensed): http://trac.wikia-code.com/browser/wikia/trunk/extensions/wikia/Places
The
WikiaApiPlacesclass might give you what you need. Good luck. 🙂