Template:Location map/Creating a new map template

Understanding map definition templates
The Location map family of templates utilize any one of a set of map definition templates. These are not forks but rather auxiliary templates and are must have names such as "Location map location", where location is the name of the area covered by the map. To create a simple map definition template using an image of a map with an equirectangular Mercator projection:


 * 1) Create a new map image and upload it to Wikimedia commons or find an existing map on the same site.
 * 2) Create a template named Template:Location map location, copy the content below into it and substitute the appropriate values.

As an example of a map that uses an equirectangular projection, we use Location map Bosnia and Herzegovina. Please do not experiment using active templates.



Maps of this type work will for small to mid sized areas. Location map USA is another example of a map description template that uses an equirectangular projection. Notice that the image of the country is not what most would expect.

Maps that use other projections, such as Location map USA2, which uses an equidistant conic projection. require formulas which are used to calculate the  and   coordinates for the location mark. Understanding these formulas requires a familiarity with the subject and is currently beyond the scope of this discussion. Note that the formula for  evaluates to 0 for the left edge of the image and 100 for the right edge. Likewise, the formula for  evaluates to 0 for the top edge and 100 for the bottom edge.