வார்ப்புரு:Location mark+/doc
{{documentation subpage}}
 &lt;!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE --&gt;
 
 This template places one or more marks on an image, with optional labels. The helper template {{[[Template:Location mark~|Location mark~]]}} can be used one or more times to generate the marks with labels. For labels only, the template {{[[Template:Location mark label|Location mark label]]}} can place each colored label, of any font size, onto the image.
 
 Other templates are more capable of superimposing one image on another. This template centers a mark over a location on any image using coordinate values that are relative. The size of the composite image can changed without changing the relative positions of the markers. The composite image can be displayed as a simple image, a bordered image or a thumbnail image.
 
 If the geographic coordinates of the locations are known and a [[Template:Location map+#Available map templates|location map template]] exists, then one of the templates in the {Location_map} family should be used instead. The [[#See also|See-also]] section, below, lists alternative templates.
 
 == Usage ==
 {{location mark+ |image=Usa edcp location map.svg |width=300 |float=right |caption=Some locations in the U.S. |type=thumb |marks=
   {{location mark~ |width=300 |label=San Francisco |background=#fefee9 |mark=Purple pog.svg |x=54 |y=265 }}
   {{location mark~ |width=300 |label=Four Corners |background=#fefee9 |mark=Green pog.svg |position=bottom |x=275 |y=326 }}
   {{location mark~ |width=300 |label=New York |background=#fefee9 |mark=Cyan pog.svg |x=860 |y=214 }}
 }}
 {|
 |- valign=top
 |&lt;pre style=&quot;width:15em; margin-right:2em;&quot;&gt;
 {{Location mark+
 | image = 
 | width = 
 | caption = 
 | alt = 
 | type = 
 | float = 
 | marks = 
 }}&lt;/pre&gt;
 |&lt;pre style=&quot;width:15em;&quot;&gt;
 {{Location mark~
 | width = 
 | label = 
 | position = 
 | font_size = 
 | background = 
 | mark = 
 | mark_width = 
 | mark_alt = 
 | mark_link = 
 | x = 
 | y = 
 }}&lt;/pre&gt;
 |}
 
 == Parameters ==
 {| class=&quot;wikitable&quot; style=&quot;font-size:90%; width:100%;&quot;
 |+ Parameters for Location map+
 ! Parameter
 ! Description
 |-
 |&lt;code&gt;image&lt;/code&gt;
 | Required. The name of an image file.
 |-
 |&lt;code&gt;overlay&lt;/code&gt;
 | The name of an image file to superimpose on the image. It should be the same size and have a transparent background.
 |-
 |&lt;code&gt;width&lt;/code&gt;
 | Determines the width of the image in [[pixel]]s. The default is 220px. For example &lt;code&gt;width=240&lt;/code&gt; and not &lt;code&gt;width=240px&lt;/code&gt;.
 |-
 | &lt;code&gt;caption&lt;/code&gt;
 | The caption text displays below the image if the thumbnail option is used. See the [[#Examples|examples]].
 |-
 |&lt;code&gt;alt&lt;/code&gt;
 | Alt text for the map. See [[WP:ALT]]. If no &lt;code&gt;alt&lt;/code&gt; text is provided the &lt;code&gt;caption&lt;/code&gt; text will be used.
 |-
 | &lt;code&gt;type&lt;/code&gt;
 | Determines the display format. Valid values are &lt;code&gt;thumb&lt;/code&gt;, and &lt;code&gt;border&lt;/code&gt;. The &lt;code&gt;thumb&lt;/code&gt; option generates output similar to &lt;code&gt;&lt;nowiki&gt;[[File:|name|thumb]]&lt;/nowiki&gt;&lt;/code&gt;, while the &lt;code&gt;border&lt;/code&gt; option generates output similar to &lt;code&gt;&lt;nowiki&gt;[[File:|name|border]]&lt;/nowiki&gt;&lt;/code&gt;. If no valid value is assigned, the output will not be framed or bordered. See [[#The type parameter|below]] and [[wp:Extended image syntax#Type|this page]].
 |-
 |&lt;code&gt;float&lt;/code&gt;
 | Determines the position of the image on the page. Valid values are &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;center&lt;/code&gt; and &lt;code&gt;none&lt;/code&gt;. The default is &lt;code&gt;right&lt;/code&gt;''.
 |-
 |&lt;code&gt;marks&lt;/code&gt;
 | Places one or more marks on the image using the template {{tlc|Location mark~}}. See below.
 |}
 
 {| class=&quot;wikitable&quot; style=&quot;font-size:90%; width:100%;&quot;
 |+ Parameters for Location mark~
 ! Parameter
 ! Description
 |-
 |&lt;code&gt;width&lt;/code&gt;
 | The width of the image. The default is 220px. ''Must'' be the same as the width of the image.
 |-
 |&lt;code&gt;label&lt;/code&gt;
 | Optional. The text of the label to display next to the mark. The text can be [[Wiki markup|wiki linked]].
 |-
 |&lt;code&gt;position&lt;/code&gt;
 | The position of the label relative to the mark. Valid values are &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt; and &lt;code&gt;bottom&lt;/code&gt;. The default is &lt;code&gt;right&lt;/code&gt;''. If none is assigned then the template will place the label either to the right or the left depending on the location of the mark.
 |-
 |&lt;code&gt;font_size&lt;/code&gt;
 |  The font size to use for the label as a percentage. The default is 90%. For example &lt;code&gt;font_size=80&lt;code&gt;.
 |-
 |&lt;code&gt;background&lt;/code&gt;
 | The background color to use for the label text. See [[Web colors]]. By default the background color is inherited from the image behind the label.
 |-
 |&lt;code&gt;mark&lt;/code&gt;
 | The name of an image to display as the mark. The default is [[:File:Red pog.svg|Red pog.svg]]. Go [[commons:Location markers|here]] and [[commons:Category:map icons|here]] for some examples.
 |-
 |&lt;code&gt;mark_width&lt;/code&gt;
 | The width of the mark in [[pixel]]s. The default is 8px. For example &lt;code&gt;mark_width=7&lt;/code&gt; and not &lt;code&gt;mark_width=7px&lt;/code&gt;. Labels do not work well with large mark images. This template is not intended to generate overlays. See {{tl|Superimpose}}.
 |-
 |&lt;code&gt;mark_link&lt;/code&gt;
 | Specifies a [[Wiki markup|wiki link]] which will be followed if the reader clicks on the mark. The name of the linked article will be displayed as a tool tip when the mouse pointer hovers over the mark.
 |-
 |&lt;code&gt;mark_alt&lt;/code&gt;
 | Alt text for the mark image. See [[WP:ALT]]. If no &lt;code&gt;mark_alt&lt;/code&gt; text is provided the &lt;code&gt;label&lt;/code&gt; text will be used.
 |-
 |&lt;code&gt;x&lt;/code&gt;&lt;br/&gt;&lt;code&gt;y&lt;/code&gt; || Specifies the position of the marker on the image. The coordinates of the marker in pixels based on a map with a width of 1000 pixels. The template will scale these values for proper display. See [[#Place a mark on an image using the x and y parameters|below]].
 |-
 |&lt;code&gt;x%&lt;/code&gt;&lt;br/&gt;&lt;code&gt;y%&lt;/code&gt; || Specifies the position of the marker on the image. &lt;code&gt;x%&lt;/code&gt; specifies the percentage of the distance across the image from the left edge and &lt;code&gt;y%&lt;/code&gt; specifies the percentage of the distance down from the top edge.  See [[#Place a mark on an image using the x% and y% parameters|below]].
 |}
 
 {| class=&quot;wikitable&quot; style=&quot;font-size:90%; width:100%;&quot;
 |+ Parameters for Location mark label
 ! Parameter
 ! Description
 |-
 |&lt;code&gt;label&lt;/code&gt;
 | Text of the label to display, which can be [[Wiki markup|wiki-linked]].
 |-
 |&lt;code&gt;lwidth&lt;/code&gt;
 | Width of the label to display, before wrapping (default: lwidth=18em).
 |-
 |&lt;code&gt;lheight&lt;/code&gt;
 | Line-height of the label to display, for interline spacing (default: lheight=111%).
 |-
 |&lt;code&gt;position&lt;/code&gt;
 | The position of the label relative to the mark. Valid values are &lt;code&gt;left&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;top&lt;/code&gt; and &lt;code&gt;bottom&lt;/code&gt;. The default is &lt;code&gt;right&lt;/code&gt;''. If none is assigned then the template will place the label either to the right or the left depending on the location of the mark.
 |-
 |&lt;code&gt;size&lt;/code&gt;
 |  Font size to use for the label. Default is 90%. Example: &lt;code&gt;size=80&lt;code&gt;.
 |-
 |&lt;code&gt;color&lt;/code&gt;
 | The foreground color to use for the label text. See [[Web colors]]. Default: black. Examples: color=purple, or color=#0099EE (green-blue).
 |-
 |&lt;code&gt;bg&lt;/code&gt;
 | The background color to use for the label text. See [[Web colors]]. By default, the background color is inherited from the image behind the label. Examples: bg=darkorange, or bg=#0099EE (green-blue).
 |-
 |&lt;code&gt;mark&lt;/code&gt;
 | The name of an image to display as the mark. The default is [[:File:Red pog.svg|Red pog.svg]]. Go [[commons:Location markers|here]] and [[commons:Category:map icons|here]] for some examples.
 |-
 |&lt;code&gt;mark_width&lt;/code&gt;
 | Width of the mark in [[pixel]]s. The default is 0 (suppressed). For example &lt;code&gt;mark_width=7&lt;/code&gt;.
 |-
 |&lt;code&gt;mark_link&lt;/code&gt;
 | Specifies a [[Wiki markup|wiki link]] which will be followed if the reader clicks on the mark.
 |-
 |&lt;code&gt;mark_alt&lt;/code&gt;
 | Alt text for a mark. See [[WP:ALT]]. Defaults to &lt;code&gt;label&lt;/code&gt;.
 |-
 |&lt;code&gt;x&lt;/code&gt; or &lt;code&gt;x%&lt;/code&gt;
 | Location left-to-right of label along horizontal axis. See below.
 |-
 |&lt;code&gt;y&lt;/code&gt; or &lt;code&gt;y%&lt;/code&gt;
 | Location top-to-bottom of label along vertical axis. See below.
 |}
 
 == Mark placement parameters ==
 There are two ways to generate a marker on a map.
 
 === Place a mark on an image using the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; parameters ===
 The values for the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; parameters are the pixel coordinates of the location mark when the image is scaled to a width of 1000 pixels. 
 
 :&lt;code&gt;x&lt;/code&gt; is the pixel offset for the mark from the left edge of an image 1000px wide.
 :&lt;code&gt;y&lt;/code&gt; is the pixel offset for the mark from the top edge of an image 1000px wide.
 
 There are at least two ways of obtaining these values:
 
 #Download the image from the image's [[Help:file page|file page]] to your computer. Open the image in a [[graphics software|graphics editor]], such as [[GIMP]] or [[XnView]]. Scale (resize) the image to a width of 1000px and then note the x, y coordinates when the [[mouse cursor|cursor]] points to to the desired location. Use these values directly.
 #Download the image from the image's [[Help:file page|file page]] to your computer. Open the image in any [[image viewer]] that displays the coordinates of the cursor position, such as [[Paint (software)|Paint]] from Microsoft. Note the x, y coordinates when the [[mouse cursor|cursor]] points to the location. Then:
 
 ::{{math|size=14pt|{{sfrac|1000{{·}}x'|w}} {{=}} {{math|size=13pt|x}}}}&amp;nbsp; and&amp;nbsp; {{math|size=14pt|{{sfrac|1000{{·}}y'|w}} {{=}} {{math|size=13pt|y}}}}
 
 ::where {{math|size=13pt|x'}} and {{math|size=13pt|y'}} are the cursor coordinates, {{math|size=13pt|w}} is the width of the image displayed on your computer and {{math|size=13pt|x}} and {{math|size=13pt|y}} are the values to assign to the &lt;code&gt;x&lt;/code&gt; and &lt;code&gt;y&lt;/code&gt; parameters.
 
 === Place a mark on an image using the &lt;code&gt;x%&lt;/code&gt; and &lt;code&gt;y%&lt;/code&gt; parameters ===
 :x% specifies the percent of the distance across the image from the left edge.
 :y% specifies the percent of the distance down from the top edge.
 
 == The '''&lt;code&gt;type&lt;/code&gt;''' parameter ==
 &lt;div class=&quot;center&quot;&gt;
 {| style=&quot;float: none;
 ! &lt;code&gt;default&lt;/code&gt;
 ! &lt;code&gt;type=border&lt;/code&gt;
 ! &lt;code&gt;type=thumb&lt;/code&gt;
 |- valign=&quot;top&quot; style=&quot;padding-left: 10em;&quot;
 | width = &quot;280px&quot; | {{Location mark+
 | width = 200
 | image = Scottish infobox template map.png
 | caption = Three locations on the coast of Scotland
 | float = none
 | type =
 | marks =
 {{Location mark~
   | width = 200
   | label = '''Cape Wrath'''
   | position = right
   | mark_width = 7
   | x = 391 | y = 478 }}
 {{Location mark~
   | width = 200
   | label = '''Rattray Head'''
   | position = left
   | mark_width = 7
   | x = 850 | y = 714 }}
 {{Location mark~
   | width = 200
   | label = '''Ardnamurchan Point'''
   | position = right
   | x = 202 | y = 883 }}&lt;/div&gt;
 }}
 | width = &quot;280px&quot; | {{Location mark+
 | width = 200
 | image = Scottish infobox template map.png
 | caption = Three locations on the coast of Scotland
 | float = none
 | type = border
 | marks =
 {{Location mark~
   | width = 200
   | label = '''Cape Wrath'''
   | position = right
   | mark_width = 7
   | x = 391 | y = 478 }}
 {{Location mark~
   | width = 200
   | label = '''Rattray Head'''
   | position = left
   | mark_width = 7
   | x = 850 | y = 714 }}
 {{Location mark~
   | width = 200
   | label = '''Ardnamurchan Point'''
   | position = right
   | x = 202 | y = 883 }}
 }}
 | width = &quot;280px&quot; | {{Location mark+
 | width = 200
 | image = Scottish infobox template map.png
 | caption = Three locations on the coast of Scotland
 | float = none
 | type = thumb
 | marks =
 {{Location mark~
   | width = 200
   | label = '''Cape Wrath'''
   | position = right
   | mark_width = 7
   | x = 391 | y = 478 }}
 {{Location mark~
   | width = 200
   | label = '''Rattray Head'''
   | position = left
   | mark_width = 7
   | x = 850 | y = 714 }}
 {{Location mark~
   | width = 200
   | label = '''Ardnamurchan Point'''
   | position = right
   | x = 202 | y = 883 }}
 }}
 |}
 &lt;/div&gt;
 
 == Examples ==
 The first two examples could be duplicated using {{tl|Location map+}}.
 
 === Using mostly default values ===
 {{Location mark+
 | width =
 | image = Scotland relief location map.jpg
 | caption = Weather stations in Scotland
 | float =
 | type =
 | marks =
 {{Location mark~
   | width =
   | label = '''Cape Wrath'''
   | position =
   | x = 452 | y = 480 }}
 {{Location mark~
   | width =
   | label = '''Rattray Head'''
   | position =
   | x = 835 | y = 703 }}
 {{Location mark~
   | width =
   | label = '''Ardnamurchan Point'''
   | position =
   | x = 307 | y = 865 }}
 }}
 &lt;pre style=&quot;width: 50em;&quot;&gt;
 {{Location mark+
 | width =
 | image = Scotland relief location map.jpg
 | caption = Weather stations in Scotland
 | float =
 | type =
 | marks =
 {{Location mark~
   | width =
   | label = '''Cape Wrath'''
   | position =
   | x = 452 | y = 480 }}
 {{Location mark~
   | width =
   | label = '''Rattray Head'''
   | position =
   | x = 835 | y = 703 }}
 {{Location mark~
   | width =
   | label = '''Ardnamurchan Point'''
   | position =
   | x = 307 | y = 865 }}
 }}
 &lt;/pre&gt;
 {{clear}}
 
 === Using background color for labels ===
 {{Location mark+
 | image = North Rhine-Westphalia location map 05.svg
 | width = 300
 | caption = Largest cities in [[North Rhine-Westphalia]]
 | type = thumb
 | marks =
 {{Location mark~
   | width = 300
   | label = Cologne
   | position = right
   | background = #a7cb9d
   | x = 302 | y = 702 }}
 {{Location mark~
   | width = 300
   | label = Düsseldorf
   | position = left
   | background = #a7cb9d
   | x = 267 | y = 574 }}
 {{Location mark~
   | width = 300
   | label = Dortmund
   | position = right
   | background = #a7cb9d
   | x = 456 | y = 457 }}
 {{Location mark~
   | width = 300
   | label = &lt;br /&gt;Essen
   | position = right
   | background = #a7cb9d
   | x = 328 | y = 484 }}
 {{Location mark~
   | width = 300
   | label = Duisburg
   | position = left
   | background = #a7cb9d
   | x = 261 | y = 496 }}
 }}
 &lt;pre style=&quot;width: 50em;&quot;&gt;
 {{Location mark+
 | image = North Rhine-Westphalia location map 05.svg
 | width = 300
 | caption = Largest cities in [[North Rhine-Westphalia]]
 | type = thumb
 | marks =
 {{Location mark~
   | width = 300
   | label = Cologne
   | position = right
   | background = #a7cb9d
   | x = 302 | y = 702 }}
 {{Location mark~
   | width = 300
   | label = Düsseldorf
   | position = left
   | background = #a7cb9d
   | x = 267 | y = 574 }}
 {{Location mark~
   | width = 300
   | label = Dortmund
   | position = right
   | background = #a7cb9d
   | x = 456 | y = 457 }}
 {{Location mark~
   | width = 300
   | label = &lt;br /&gt;Essen
   | position = right
   | background = #a7cb9d
   | x = 328 | y = 484 }}
 {{Location mark~
   | width = 300
   | label = Duisburg
   | position = left
   | background = #a7cb9d
   | x = 261 | y = 496 }}
 }}
 &lt;/pre&gt;
 {{clear}}
 
 === Using an invisible mark ===
 {{Location mark+
 | image = Take five.jpg
 | caption = Cute chicks
 | type = thumb
 | marks =
 {{Location mark~
   | label = Rachel
   | position = top
   | background = #ae9074
   | mark = Blanksvg.svg
   | x = 433 | y = 295 }}
 {{Location mark~
   | label = Alice
   | position = top
   | background = #ae9074
   | mark = Blanksvg.svg
   | x = 812 | y = 245 }}
 }}
 &lt;pre style=&quot;width: 50em;&quot;&gt;
 {{Location mark+
 | image = Take five.jpg
 | caption = Cute chicks
 | type = thumb
 | marks =
 {{Location mark~
   | label = Rachel
   | position = top
   | background = #ae9074
   | mark = Blanksvg.svg
   | x = 433 | y = 295 }}
 {{Location mark~
   | label = Alice
   | position = top
   | background = #ae9074
   | mark = Blanksvg.svg
   | x = 812 | y = 245 }}
 }}
 &lt;/pre&gt;
 {{clear}}
 
 == See also ==
 * {{tl|Location mark}}
 * {{tl|Location map}}
 * {{tl|Location map+}}
 * {{tl|Superimpose}}
 * {{tl|Superimpose2}}
 * {{tl|Overlay}}
 * {{tl|Annotated image}}
 * {{tl|Image label}}
 
 &lt;includeonly&gt;
 &lt;!-- Add categories and interwikis below this line --&gt;
 [[Category:Graphic templates]]