MediaWiki Extension: OSCoordinates 0.01 review
DownloadMediaWiki Extension: OSCoordinates is an extension that converts an Ordnance Survey grid reference to a nice chunk of HTML containing
|
|
MediaWiki Extension: OSCoordinates is an extension that converts an Ordnance Survey grid reference to a nice chunk of HTML containing:
The Coordinates in a consistent style (e.g. "NT 123 456")
The Coordinates are a hyperlink to the Ordnance Survey get-a-map site showing the map for those coordinates.
Longitude and latitude conversion
OS coordinates are split into two groups - Great Britian (including some of the islands), and Ireland. At present grid references from Ireland are not supported.
Using the Extension:
Extract the archive so that the OSCoordinate directory is in your "[wikiroot]/extensions" directory. Then add the following line to your LocalSettings.php file:
require_once("extensions/OSCoordinates/OSCoordinates.php");
Once you've done that, you can put your OS coordinates in your wiki text surrounded by the new < OSCoord > tag. E.g.
< OScoord >NT 049 935 in wikitext becomes:
{NZ 049 935 / 1°55'23" W 55°14'8" N}
The format of the reference between the new tags is tolerant of whitespace and will cope with 2, 4, 6 and 8 character coordinates, i.e. all these are OK:
< OSCoord >NT1245< /OSCoord >
< OSCoord >NT12 45< /OSCoord >
< OSCoord >NT 123 456< /OSCoord >
< OSCoord >NT14< /OSCoord >
< OSCoord >NT< /OSCoord >
For 2, 4 and 6 character coordinates, the accuracy of the output is still an 8 character corrdinate, with 0 padding. e.g. "NT12" becomes "NT 100 200".
When the page is displayed, the output will look like this:
{NT 933 047 / 2°6'20" W 55°20'11" N}
Where the "NT 933 047" is a hyperlink to the OS web site.
MediaWiki Extension: OSCoordinates 0.01 keywords