<?xml version="1.0"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Andoza:Location map/Creating a new map definition - Oʻzgarishlar tarixi</title>
		<link>https://ziyosfera.uz/index.php?title=Andoza:Location_map/Creating_a_new_map_definition&amp;action=history</link>
		<description>Ziyosferadagi mazkur sahifaning oʻzgarishlar tarixi</description>
		<language>uz</language>
		<generator>MediaWiki 1.45.1</generator>
		<lastBuildDate>Sat, 21 Nov 2026 19:36:33 GMT</lastBuildDate>
		<item>
			<title>Programmer: Oʻzbekcha Vikipediyadan import qilindi.</title>
			<link>https://ziyosfera.uz/index.php?title=Andoza:Location_map/Creating_a_new_map_definition&amp;diff=127599&amp;oldid=prev</link>
			<guid isPermaLink="false">https://ziyosfera.uz/index.php?title=Andoza:Location_map/Creating_a_new_map_definition&amp;diff=127599&amp;oldid=prev</guid>
			<description>&lt;p&gt;Oʻzbekcha Vikipediyadan import qilindi.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Yangi sahifa&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{ZiyoSfera how-to}}&lt;br /&gt;
This guides explains how to create map definitions for the {{tlf|Location map}} family of templates.&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
== Map definition data ==&lt;br /&gt;
{{expand section|date=August 2011}}&lt;br /&gt;
&lt;br /&gt;
The 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]] having the equator as its standard parallel (aka plate carrée, “unprojected”, lat/lon 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;
=== Advanced projections ===&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, so you are more than welcome to skip this section.&lt;br /&gt;
&lt;br /&gt;
The input $1 is the latitude and $2 is the longitude, both in decimal form. The expression follows the syntax of [[mw:Help:Extension:ParserFunctions##expr|ParserFunction &amp;quot;#expr&amp;quot;]]. The two output coordinates are defined such 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; 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;
It is easiest to use the de facto template at [[Module:Location map/data/doc]] to generate the documentation page. Here is another example of what the documentation might look like:&lt;br /&gt;
&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;</description>
			<pubDate>Thu, 06 Aug 2026 13:59:29 GMT</pubDate>
			<dc:creator>Programmer</dc:creator>
			<comments>https://ziyosfera.uz/ziyo/Andoza_munozarasi:Location_map/Creating_a_new_map_definition</comments>
		</item>
</channel></rss>