Template:Location map/doc

This template displays a location map as a composite image of an existing map plus a marker and an optional label superimposed onto it. Maps used here are not just images alone. Instead, maps are selected by mapper-template suffixes "XX" (to use template "Location map XX"). Maps can be defined either as squared for equirectangular projections or else, have curved latitude or longitude lines, to skew the location of the marker symbol, as in Location map Africa. That mapper for Africa uses sine/cosine factors to shift the marker x/y to fit the curved lines. Each mapper template sets its own map borders and decides if skewing x/y for curved lines. See the technical design below, under "Design issues".

Note:
 * Setting caption=xxxxx also frames the map, while an empty "caption=" leaves the map unframed.
 * The coordinates are not checked. If the coordinates fall outside the map, then the marker will try to appear outside the map-image, overlaying the page text.
 * For a map with no marker, set marksize=1.
 * Do not use "px". Using width=200px causes maps to cover a page, use: width=200 (no "px").
 * To create a map with more than one marker, refer below to: See also.
 * To display a map that uses a non-equirectangular projection (i.e. has curved latitude or longitude lines), use skew factors for x/y as in Location_map Africa or try Template:Location map skew.

Usage
Parameter "location" refers to a map definition template. If location is Spain, the map image and coordinates are based on the values set in Template:Location map Spain.

Decimal degree coordinates


Degree, Minute, Second coordinates


Available map templates
There are over 1000 mapper templates, named for nations or regions:

For a list, see Category:Location map templates or Special:WhatLinksHere/Template:Location map/Info.

Creating new map templates

 * 1) Find an appropriate blank map in equirectangular projection.
 * 2) Create a template named Template:Location map location (copy the content of any other map template into it and enter appropriate values).

Default width, float, label position, and caption (decimal coordinates)


Map with the default caption (degrees/minutes)


Marker/Label outside of Map


Map with a custom caption and text background


Map with enlarged marker and label


Map with no caption or border


Alternative style of map




Using Alternative Map




Relief




Map that crosses 180° meridian

 * See Category:Location map templates crossing 180th meridian



Design issues
Each of the mapper templates named as "Location_map_XX" (such as Location_map_Africa) contains a map-image name, latitude range, longitude range, or x/y skew factors, as the details hidden by data encapsulation (computer science). Some mapper templates treat latitude/longitude as straight lines (Mercator projections), whereas other mappers have skew factors for maps with curved lines. Hence, each of those templates is not a "fork" of Location map but instead, they are accessor functions which access the map-border coordinates or skew-factors as shared data, rather than being repeated data in each article using Location map Italy. If Italy officially changes its map borders, then only that one mapper template need be changed, and only those Italy-related articles will be reformatted. The total of 20,000+ articles using {Location_map} will NOT be reformatted when someone updates each particular "Location_map_XX" and so the impact on WikiQueer server work is reduced, as roughly 450 times faster, by having 450 separate mapper templates.