Mapify a MediaWiki with New Extension

Adam DuVander
Jul. 28 2009, 12:11AM EDT

The project that runs Wikipedia has added improved mapping extensions that let you embed Yahoo or Google Maps within your Wiki pages. Special markup is translated to API calls, which keeps out JavaScript that would be required if creating maps directly.

Once the Maps extension is installed, anyone editing a MediaWiki page can include the familiar Wiki syntax with curly brackets. For example, use this code to display a point:

{{#display_point:coordinates=55.7557860, 37.6176330}}

Or use the city name (or address) and have the geocoding performed automatically:

{{#display_address:address=Moscow, Russia}}

MediaWiki Maps on OpenLayers

Since this is an extension, it is an optional addition to MediaWiki. Therefore, don't expect to be able to use maps on Wikipedia or other sites unless you know the administrator has installed the extension.

So far you can choose from three mapping providers: Google, Yahoo and OpenLayers (which uses underlying maps from many providers). This might remind you of the JavaScript wrapper library Mapstraction (our Mapstraction API profile), which provides a single syntax to access a dozen mapping APIs.

Hat tip: slashgeo

Adam DuVander -- Adam heads developer relations at Orchestrate, a database-as-a-service company. He's spent many years analyzing APIs and developer tools. Previously he worked at SendGrid, edited ProgrammableWeb and wrote for Wired and Webmonkey. Adam is also the author of mapping API cookbook Map Scripting 101.

Comments

Comments(1)