Monday, July 25, 2011

MediaWiki geographic markup at Wikipedia

 
I saw some useful geographic markup at wikipedia today.

The article for the town of Dawson Creek ends with graphic display of relevant links by direction.

Wikipedia is generated by MediaWiki, itself written in server-side PHP.  You will not see the markup unless you run EDIT on the geo links section.  What you will see then is:

{{Canadian City Geographic Location (8-way)
|Centre    = Dawson Creek
|Northwest = [[Fort St. John, British Columbia|Fort St. John]]
|North     = [[Taylor, British Columbia|Taylor]]
|Northeast = [[Fairview, Alberta (town)|Fairview]]
|East      = [[Rycroft, Alberta|Rycroft]]
|Southeast = [[Hythe, Alberta|Hythe]]
|South     = [[Pouce Coupe, British Columbia|Pouce Coupe]]
|Southwest = [[Tumbler Ridge, British Columbia|Tumbler Ridge]]
|West      = [[Chetwynd, British Columbia|Chetwynd]]
|image_flag            =
}}
Over at my Curl blog I'll place some Curl code that does the same on the client side of a browser.  This will not require an 'extension' to Curl but will simply be a declarative use of an instance of a user class or of a user macro.


Really quite simple and useful for the towns accessible from the junction of highways which form Mile 0 of the Alaska Highway.


 

No comments: