Extension:GeoRSS

The GeoRSS plugin introduces an easy interface for geotagging MediaWiki articles, and publishes a GeoRSS feed of all mapped articles in the Wiki, for mapping and syndication.

The extension has been deployed and is working well, but is in need of some care in packaging and clean up. That's the next step after initial posting here on mediawiki.org. Still, everything is documented below. Get in touch with me at mikel_maron yahoo com for anything related to this extension.

GoogleMaps.php
GoogleMaps.php is based on Evan Miller's Extension:Google_Maps. Primarily the GeoRSS extension is borrowing the clever method of inserting a small editable Google Map into the GUI via Javascript. GeoRSS extension adds international city geocoding, and handles all storage of geotags without the user constructing any special wiki text. The design decision here is that all geotagging is through interaction with the map. This is accomplished by a bit more javascript, and pre and post editing hooks in the extension.

Place GoogleMaps.php in your extensions/ directory. In LocalSettings.php
 * set $wgGoogleMapsKey to a key generated from here
 * add require_once("extensions/GoogleMaps.php");

DynamicPageList.php
DynamicPageList.php is based on. The GeoRSS extension version adds support for outputting GeoRSS feeds.

Place DynamicPageList in your extensions/ directory. In LocalSettings.php
 * add require_once("extensions/DynamicPageList.php");

Javascript, Scripts, and Images
Place all of the following in skins/gmaps/ 


 * mgeorss.js This is an extension to the Google Maps API that adds GeoRSS Parsing. More information here.
 * mgeocoder.2.js This is an extension to the Google Maps API that add international city geocoding. More information here.
 * mgeocoder.2.js requires a "proxy" to query the remote geocoder. There's a choice of versions in php, proxy.php, or perl, proxy.pl. Try the php version, which may only work on some system configurations; then try the perl version, making sure to change the reference to "proxy.php" to "proxy.pl" in mgeocoder.2.js.
 * 00BB00.png and EE8800.png are custom markers set in GoogleMaps.php. If you wish to use different markers, edit the code in GoogleMaps.php or replace these icons.

Setting up the GeoRSS feed
The GeoRSS feed is a special wiki page. Create a page with the name of your choosing (for example, "GeoRSSFeed"). Set the content of the page to ..

&lt;DynamicPageList> category=Mapped mode=rss &lt;/DynamicPageList>

.. and save. Now add ?action=xml to the url, and you will see the GeoRSS feed.

Any of the other DynamicPageList options are permitted, so for instance it's possible to set up a GeoRSS feed of Mapped pages in another particular category.

But I don't see a GeoRSS feed
The most common problem is that short urls are not enabled. The easiest solution is to Enabled Short URLs.

If Short Urls are not an option, then you'll need to be able to hack at the MediaWiki source. Add &action=xml to the url. This works fine for manual inspection, but when loaded by a map in the wiki (see next step), the "&" is urlencoded, and won't be properly parsed. The solution is to edit include/Wiki.php, in function performAction change

$action = $this->getVal('Action');

to

$action = $this->getVal('Action'); if (strpos($_SERVER{'QUERY_STRING'},'action=xml')) { $action = 'xml'; }

Setting up a Map
Now you can add a map to any other wiki page, which will display all mapped pages in the GeoRSS feed.

&lt;googlemap lat="15" lon="0" zoom="2" width="1000" height="500" rss1="/wiki/training/index.php/GeoRSS1?action=xml" rss2="/wiki/training/index.php/GeoRSS2?action=xml"> &lt;/googlemap>

The options:
 * lat, lon, zoom : the latitude, longitude, and zoom level of the map
 * width, height : width and height of the map
 * rss1, rss2 : the urls of the GeoRSS feeds to display. Only use "rss1" to display a single feed.

Suggestions & Ideas
Have any suggestions for future development of this plugin? Add them here.

Deployments

 * The Melpedia - under the top level categories on the homepage.
 * Wikimaas - Independent city guide Maastricht - Adjusted the page-map to be included after page-text. Modified map-size and style. Modified default category-name.
 * United Nations INSTRAW Gender Training Wiki
 * United Nations Web4Dev Wiki