Template:Gbmappingitem/doc

gbmappingitem
Outputs the globe symbol linking to interactive maps; WGS-84 coordinates linking to GeoHack using the coord figures; OS grid reference (with WGS84 co-ordinates as a rollover box) linking to GeoHack using the OS ref.(Printed/pdf pages get both sets of coordinates printed at standard size)

Intended purpose: To output a compact map link with coord and GB OS grid reference for lists and tables of UK locations, with an option to reduce the text size of the coords. By retaining the °N, °W call, all features of, interactive map, etc. are retained. (Template:gbmappingsmall does not currently offer this).

Required Parameters
The first three parameters are all required, and must be in the order given: WGS-84 Coordinates should be decimal, to an appropriate level of accuracy (normally 4 decimal places maximum), and must use +/- (not E/W). Since the location must relate to the GB Ordnance Survey area, latitude will always be +ve.
 * OS Grid ref: in the form AB123456 (for example). Degree of accuracy is flexible, but for most purposes a six figure reference is good, identifying a 100m square. 8 figures identifies a 10-metre square. Spaces to separate the elements are permitted. e.g. AB 123 456. (For details see Ordnance Survey National Grid)
 * Coord Northing: +ve decimal number
 * Coord Easting: +/-ve decimal number

Optional parameters
Various of the geohack maps currently use these, (e.g. Bing, Google Maps, most aerial images, etc.) and they could become even more useful in the future.
 * format= 0 to 11: Odd Nos force Grid ref onto a new line and indent, for use in tables. Even Nos display all on one line. Type size of the GWS-84 text is reduced with larger Nos. 0 (default) & 1 = normal size. 10 & 11 = very very tiny. See table below. (pdf output ignores this setting)
 * type= e.g. city(pop), city, landscape, forest. These give a broad scale guide to some maps. (defaults to city, i.e. a scale of 1:300,000). For a full list of types see Coord Documentation.
 * scale= e.g. 1:50,000, 1:300,000. This will override the type scale.
 * dim= e.g. 5000, 10 km etc. Distance in metres or kilometres across the width of the object. This also overrides type. The default, if none of the scaling parameters are set, is 30 km/1:300,000
 * name= place name. If not supplied, will default to current PAGENAME. The GeoHack map pages show the name on any markers etc., but any links are always back to the current PAGENAME.

Example 1 (six-figure grid reference, format 0):

Example2 (ten-figure grid reference, format 2):

Example3 (four-figure grid ref, format 5):

Limitations
It does not do the conversion! Both sets of coordinates need to be provided. It only adds the data inline - i.e. not at the top of the page - and Template:coord should always be used to provide the title coordinates on all geographical pages. This template should be used for lists of locations and such like within the OS Grid area, and is to enable compact inclusion of externally sourced OS grid references.

Both the WGS coordinates (via their link) and the OS grid ref (via clicking the number) link to the GeoHack page, each using their own data. It is the editor's responsibility to ensure the numbers match, and point to the right place. No cross-checking is carried out. (The main advantage of linking from both sets of coordinates is to allow people to easily check that both agree.)

Only the WGS84 link currently forwards the value in 'name', and GeoHack assumes but does not require that it will be a valid Wikipedia page name. The grid ref link always sends the current page name (This is a limitiation of  ).