<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://escforumwiki.com/index.php?action=history&amp;feed=atom&amp;title=Template%3ALocation_map%2FCreating_a_new_map_definition</id>
	<title>Template:Location map/Creating a new map definition - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://escforumwiki.com/index.php?action=history&amp;feed=atom&amp;title=Template%3ALocation_map%2FCreating_a_new_map_definition"/>
	<link rel="alternate" type="text/html" href="https://escforumwiki.com/index.php?title=Template:Location_map/Creating_a_new_map_definition&amp;action=history"/>
	<updated>2026-04-07T00:01:18Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://escforumwiki.com/index.php?title=Template:Location_map/Creating_a_new_map_definition&amp;diff=73519&amp;oldid=prev</id>
		<title>Santos: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://escforumwiki.com/index.php?title=Template:Location_map/Creating_a_new_map_definition&amp;diff=73519&amp;oldid=prev"/>
		<updated>2018-03-17T19:26:59Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Understanding map definition templates ==&lt;br /&gt;
{{expand section|date=August 2011}}&lt;br /&gt;
&lt;br /&gt;
The {{tlf|Location map}} family of templates utilize any one of a set of map definitions. These are not forks but rather auxiliary pages and must have names following the pattern &amp;quot;Module:Location map/data/&amp;#039;&amp;#039;location&amp;#039;&amp;#039;&amp;quot; or &amp;quot;Template:Location map &amp;#039;&amp;#039;location&amp;#039;&amp;#039;&amp;quot;, where &amp;#039;&amp;#039;location&amp;#039;&amp;#039; is the name of the area covered by the map. The template space is supported only for backward compatibility; all new map definitions should be created as modules. &amp;#039;&amp;#039;&amp;#039;Important:&amp;#039;&amp;#039;&amp;#039; If a new map has the same projection and boundaries as the old map (such as [[:File:Iraq location map.svg]] and [[:File:Iraq location map2.svg]]), a new definition should &amp;#039;&amp;#039;&amp;#039;not&amp;#039;&amp;#039;&amp;#039; be created; instead, the old definition should be used with the AlternativeMap parameter. To create a simple map definition module using an image of a map with an [[equirectangular projection|equirectangular]] [[Mercator projection]]:&lt;br /&gt;
&lt;br /&gt;
# Create a new map image and upload it to [[commons:Main Page|Wikimedia commons]] or find an existing map on the same site.&lt;br /&gt;
# Create a module named Module:Location map/data/&amp;#039;&amp;#039;location&amp;#039;&amp;#039;, copy the content below into it and substitute the appropriate values.&lt;br /&gt;
# Create a page named Module:Location map/data/&amp;#039;&amp;#039;location&amp;#039;&amp;#039;/doc and follow the instructions under [[#Documentation]].&lt;br /&gt;
&lt;br /&gt;
As an example of a map that uses an equirectangular projection, we use [[Module:Location map/data/Belgium]]. Please do not experiment using active templates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;lua&amp;quot;&amp;gt;return {&lt;br /&gt;
	name = &amp;#039;Belgium&amp;#039;,&lt;br /&gt;
	top = 51.8,&lt;br /&gt;
	bottom = 49.2,&lt;br /&gt;
	left = 2.2,&lt;br /&gt;
	right = 6.9,&lt;br /&gt;
	image = &amp;#039;Belgium location map.svg&amp;#039;,&lt;br /&gt;
	image1 = &amp;#039;Belgium relief location map.jpg&amp;#039;&lt;br /&gt;
}&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
| The name of the area covered&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;top&amp;lt;/code&amp;gt;&lt;br /&gt;
| The latitude of the top edge of the image using [[decimal degrees]]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;bottom&amp;lt;/code&amp;gt;&lt;br /&gt;
| The latitude of the bottom edge of the image&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;left&amp;lt;/code&amp;gt;&lt;br /&gt;
| longitude of the left edges of the image&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;right&amp;lt;/code&amp;gt;&lt;br /&gt;
| longitude of the right edges of the image&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
| The name of the image file on Commons&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;image1&amp;lt;/code&amp;gt;&lt;br /&gt;
| The name of an alternate image, usually a relief map, which can be accessed using the &amp;lt;code&amp;gt;relief&amp;lt;/code&amp;gt; parameter.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Maps of this type will work for small to mid sized areas. [[Module:Location map/data/USA Alabama]] is another example of a map description that uses an equirectangular projection. Notice that the image of the country is not what most would expect. &lt;br /&gt;
&lt;br /&gt;
Maps that use other projections, such as [[Module:Location map/data/USA]], which uses an equidistant [[conic projection]]. require formulas which are used to calculate the &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; 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 &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; evaluates to 0 for the left edge of the image and 100 for the right edge. Likewise, the formula for &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; evaluates to 0 for the top edge and 100 for the bottom edge.&lt;br /&gt;
&lt;br /&gt;
=== Documentation ===&lt;br /&gt;
&lt;br /&gt;
Here is an example of what a documentation page should look like:&lt;br /&gt;
{{#tag:pre|&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&amp;lt;!-- Categories and interwikis go at the bottom of this page. --&amp;gt;&lt;br /&gt;
{{Module:Location map/data/doc|image=[[File:Belgium-CIA WFB Map.png|thumb|250px|Map of Belgium]]&lt;br /&gt;
|examples=&lt;br /&gt;
=== Location map, using default map (image) ===&lt;br /&gt;
{{Location map | Belgium&lt;br /&gt;
| width   = 200&lt;br /&gt;
| lat_deg = 50.85&lt;br /&gt;
| lon_deg = 4.35&lt;br /&gt;
| label   = Brussels&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:30em&amp;quot;&amp;gt;&lt;br /&gt;
{{Location map | Belgium&lt;br /&gt;
| width   = 200&lt;br /&gt;
| lat_deg = 50.85&lt;br /&gt;
| lon_deg = 4.35&lt;br /&gt;
| label   = Brussels&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Location map many, using relief map (image1) ===&lt;br /&gt;
{{Location map many | Belgium&lt;br /&gt;
| relief   = yes&lt;br /&gt;
| width    = 200&lt;br /&gt;
| caption  = Two locations in Belgium&lt;br /&gt;
| lat1_deg = 50.85&lt;br /&gt;
| lon1_deg = 4.35&lt;br /&gt;
| label1   = Brussels&lt;br /&gt;
| lat2_deg = 51.22&lt;br /&gt;
| lon2_deg = 4.40&lt;br /&gt;
| label2   = Antwerp&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:30em&amp;quot;&amp;gt;&lt;br /&gt;
{{Location map many | Belgium&lt;br /&gt;
| relief   = yes&lt;br /&gt;
| width    = 200&lt;br /&gt;
| caption  = Two locations in Belgium&lt;br /&gt;
| lat1_deg = 50.85&lt;br /&gt;
| lon1_deg = 4.35&lt;br /&gt;
| label1   = Brussels&lt;br /&gt;
| lat2_deg = 51.22&lt;br /&gt;
| lon2_deg = 4.40&lt;br /&gt;
| label2   = Antwerp&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
{{clear}}&lt;br /&gt;
&lt;br /&gt;
=== Location map+, using AlternativeMap ===&lt;br /&gt;
{{Location map+ | Belgium&lt;br /&gt;
| AlternativeMap = Belgium relief location map.jpg&lt;br /&gt;
| width   = 200&lt;br /&gt;
| caption = Two locations in Belgium&lt;br /&gt;
| places  =&lt;br /&gt;
  {{Location map~ | Belgium&lt;br /&gt;
  | lat_deg = 50.85&lt;br /&gt;
  | lon_deg = 4.35&lt;br /&gt;
  | label   = Brussels&lt;br /&gt;
  }}&lt;br /&gt;
  {{Location map~ | Belgium&lt;br /&gt;
  | lat_deg = 51.22&lt;br /&gt;
  | lon_deg = 4.40&lt;br /&gt;
  | label   = Antwerp&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;pre style=&amp;quot;width:35em&amp;quot;&amp;gt;&lt;br /&gt;
{{Location map+ | Belgium&lt;br /&gt;
| AlternativeMap = Belgium relief location map.jpg&lt;br /&gt;
| width   = 200&lt;br /&gt;
| caption = Two locations in Belgium&lt;br /&gt;
| places  =&lt;br /&gt;
  {{Location map~ | Belgium&lt;br /&gt;
  | lat_deg = 50.85&lt;br /&gt;
  | lon_deg = 4.35&lt;br /&gt;
  | label   = Brussels&lt;br /&gt;
  }}&lt;br /&gt;
  {{Location map~ | Belgium&lt;br /&gt;
  | lat_deg = 51.22&lt;br /&gt;
  | lon_deg = 4.40&lt;br /&gt;
  | label   = Antwerp&lt;br /&gt;
  }}&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&amp;lt;includeonly&amp;gt;&lt;br /&gt;
&amp;lt;!-- Categories go here, and interwikis go on Wikidata: --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Belgium location map templates|Belgium location map templates]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/includeonly&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;}}&lt;br /&gt;
&lt;br /&gt;
The following parameters are taken by [[Module:Location map/data/doc]]:&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width: 50%;&amp;quot;&lt;br /&gt;
! Parameter&lt;br /&gt;
! Description&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;image&amp;lt;/code&amp;gt;&lt;br /&gt;
| An additional image to display (other than the one the location map uses) on the right side of the documentation page. If not specified, no additional image is displayed.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;projection&amp;lt;/code&amp;gt;&lt;br /&gt;
| The type of projection the location map uses. If not specified, &amp;quot;&amp;lt;nowiki&amp;gt;an [[equirectangular projection]]&amp;lt;/nowiki&amp;gt;&amp;quot; is used.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;&lt;br /&gt;
| The name to display in the map&amp;#039;s documentation. If not specified, the actual name of the location map is used.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;examples&amp;lt;/code&amp;gt;&lt;br /&gt;
| A section containing examples of the location map&amp;#039;s usage. A {{tl|clear}} template is automatically placed at the end of the examples. If not specified, no examples are output.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;code&amp;gt;see also&amp;lt;/code&amp;gt;&lt;br /&gt;
| Additional links to place in the &amp;quot;See also&amp;quot; section.&lt;br /&gt;
|}&lt;br /&gt;
All information about the map will be automatically taken from the map&amp;#039;s definition itself.&lt;/div&gt;</summary>
		<author><name>Santos</name></author>
	</entry>
</feed>