Difference between revisions of "Module:Location map/data/Germany Neckar/doc"

From blackwiki
Jump to navigation Jump to search
blackwiki>Zyxw
(documentation and category moved from main template to /doc)
 
m (11 revisions imported)
 
(10 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
+
<!-- PLEASE ADD CATEGORIES AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
+
{{Module:Location map/data/doc
 +
| examples =
 +
=== Mannheim ===
 +
The example on the left shows the correct placement of [[Mannheim]] when ''Germany Neckar'' is used with {{tl|Location map}}.
  
'''Template:Location map GermanyNeckar''' is a location map definition used to overlay markers and labels on a map of Germany's [[Neckar]] RiverIt is used by "[[Template:Location map]]" when invoked with parameter "GermanyNeckar": <code><nowiki>{{Location map | GermanyNeckar | ...}}</nowiki></code>. The markers are placed by [[latitude]] and [[longitude]] coordinates on the default map or a similar map image.
+
Note that the marker for "Mannheim" is west of the mark, due to narrow longitudes far north (on non-equirectangular map). Longitude lines converge to the center, so center towns would be positioned more accuratelyThe "polar" skew factor should be used (as in [[Template:Location map]]) to scale longitude smaller near polar latitudes (relative to map height), and position longitudes from map center, rather than left-side base longitude (''see example below'').
  
Because the map is not [[equirectangular]], the coordinates will need to be adjusted to match northern-area mapping, or use skewed coordinates with "[[Template:Location map skew]]".
+
{{Location map | Germany Neckar
 
+
| width = 250 | float = right
[[Image:{{{{BASEPAGENAME}}|image}}|left|thumb|200px|Location map for {{{{BASEPAGENAME}}|name}}]]
+
| caption = Example using ''Location map''
{| class="wikitable"
+
| label = Mannheim | label_size = 90
|-
+
| background = #CCCC11 | position = bottom
! colspan="3" style="background-color:#DDD; color:#000" | Map parameters
+
| lat_deg = 49.4890
|-
+
| lon_deg = 8.4691
! name
 
| {{{{BASEPAGENAME}}|name}}
 
| name used in default map caption
 
|-
 
! image
 
| {{{{BASEPAGENAME}}|image}}
 
| file name of map image, without "Image:" or "File:"
 
|-
 
! top
 
| {{{{BASEPAGENAME}}|top}}
 
| latitude at top of map
 
|-
 
! bottom
 
| {{{{BASEPAGENAME}}|bottom}}
 
| latitude at bottom of map
 
|-
 
! left
 
| {{{{BASEPAGENAME}}|left}}
 
| longitude at left edge of map
 
|-
 
! right
 
| {{{{BASEPAGENAME}}|right}}
 
| longitude at right edge of map
 
|-
 
! skew
 
| {{{{BASEPAGENAME}}|skew}}
 
| to narrow longitudes; see {{tl|Location map skew}}
 
|}
 
{{-}}<!-- force separation break -->
 
 
 
== Usage ==
 
For a description of the parameters, see {{tl|Location map}} and {{tl|Location map skew}}.
 
 
 
{{Location map
 
| GermanyNeckar
 
| label = Heilbronn
 
| label_size = 90 <!-- percent 0-900% -->
 
| caption = Show "[[Heilbronn]]" on map
 
| lat_deg = 49 | lat_min = 9
 
| lon_deg = 09 | lon_min = 13
 
| background = #FFFF99
 
| float = right
 
| width = 250
 
 
}}
 
}}
Example labeling "[[Heilbronn]]":<code>
+
<pre style="overflow:auto">{{Location map | Germany Neckar
:<nowiki>{{Location map</nowiki>
+
| width = 250 | float = right
:<nowiki>| GermanyNeckar</nowiki>
+
  | caption = Example using ''Location map''
:<nowiki>| label = Heilbronn</nowiki>
+
| label = Mannheim | label_size = 90
:<nowiki>| label_size = 90 <--percent 0-900%</nowiki>
+
| background = #CCCC11 | position = bottom
:<nowiki>| caption = Show "Heilbronn" on map</nowiki>
+
| lat_deg = 49.4890
:<nowiki>| lat_deg = 49 | lat_min = 9</nowiki>
+
| lon_deg = 8.4691
:<nowiki>| lon_deg = 09 | lon_min = 13</nowiki>
+
}}</pre>
:<nowiki>| background = #FFFF99</nowiki>
+
{{Clear right}}
:<nowiki>| float = right</nowiki>
+
=== Rottweil ===
:<nowiki>| width = 250</nowiki>
+
The example shows the correct placement of [[Rottweil]] when ''Germany Neckar'' is used with {{tl|Location map}}.
:<nowiki>}}</nowiki>
 
</code>
 
{{-}}
 
  
<!-- ------------------------- Showing Rottweil-->
+
{{Location map | Germany Neckar
<hr/>
+
| width = 250 | float = right
{{Location map
+
| caption = Example using ''Location map''
| GermanyNeckar
+
| label = Rottweil | label_size = 90
| label = Rottweil  | position=right
+
| background = #FFCC66 | position = top
| label_size = 90 <!-- percent 0-900% -->
 
| caption = Show "Rottweil" on map
 
 
| lat_deg = 48 | lat_min = 10 |lat_sec = 05
 
| lat_deg = 48 | lat_min = 10 |lat_sec = 05
 
| lon_deg = 08 | lon_min = 37 |lon_sec = 29
 
| lon_deg = 08 | lon_min = 37 |lon_sec = 29
| background = <!--orange-->#FFCC66
 
| float = right
 
| width = 220
 
| AlternativeMap = <!-- none (use default map) -->
 
}}
 
Example for orange "[[Rottweil]]" at bottom:
 
<code>
 
:<nowiki>{{Location map</nowiki>
 
:<nowiki>| GermanyNeckar</nowiki>
 
:<nowiki>| label=Rottweil  | position=left</nowiki>
 
:<nowiki>| label_size = 90  <--percent 0-900%</nowiki>
 
:<nowiki>| caption = Show "Rottweil" on map</nowiki>
 
:<nowiki>| lat_deg=48 | lat_min=10</nowiki>
 
:<nowiki>| lon_deg=08 | lon_min=37</nowiki>
 
:<nowiki>| background = <!--orange-->#FFCC66</nowiki>
 
:<nowiki>| float = right</nowiki>
 
:<nowiki>| width = 220</nowiki>
 
:<nowiki>| AlternativeMap = <!--none(default)--></nowiki>
 
:<nowiki>}}</nowiki></code>
 
{{-}}
 
 
<!-- ------------------------- Showing 2: Rottweil /Mannheim -->
 
<hr/>
 
Two examples, showing "Rottweil" & "Mannheim" with map position aligned (by using parameters "float=left" and "float=right").
 
Note that the marker for "Mannheim" is west of the mark, due to narrow longitudes far north (on non-equirectangular map).
 
{{Location map | GermanyNeckar
 
| label = Rottweil
 
  | label_size = <!-- 0-900%--> 110
 
  | lat_deg = 48 |lat_min = 10 |lat_sec = 05
 
  | lon_deg = 08 |lon_min = 37 |lon_sec = 29
 
| caption = Show "Rottweil" on map
 
| background = <!--blue-->#5599EE
 
| float = left | width = 250
 
}}
 
{{Location map | GermanyNeckar
 
| caption = Show "Mannheim"
 
| skew=0.86
 
| label = Mannheim | label_size = <!-- 0-900%--> 82
 
  | lat=49.4890 | long=8.4691
 
  | markhigh=8  | position=bottom
 
  | background = <!--gold-->#CCCC11
 
| label2 = Rottweil | label2_size =103 | skew2=0.86
 
  | lat2_deg = 48 |lat2_min = 10 | pos2=bottom
 
  | lon2_deg = 08 |lon2_min = 37.5
 
  | bg2 = <!--bluegreen-->#66BBDD
 
| label3 = Anytown | label3_size =<!-- 0-900%--> 103
 
  | lat3_deg=49  | lat3_min=1.1 | pos3=left
 
  | lon3_deg=8.5 | lon3_min=0.0 | bg3 = <!--yellow-->#EEEE11
 
| float = right | width = 250
 
}}
 
Longitude lines converge to the center, so center towns would be positioned more accurately.  The "polar" skew factor should be used (as in [[Template:Location_map_skew]]) to scale longitude smaller near polar latitudes (relative to map height), and position longitudes from map center, rather than left-side base longitude (''see example below'').
 
{{-}}
 
 
<!-- ------------------------- Showing: Rottweil /Mannheim -->
 
<hr/>
 
===Example skewing Rottweil/Mannheim===
 
Example showing "[[Rottweil]]" (and "[[Mannheim]]") on one map.
 
 
{{Location map skew<!--many--> | GermanyNeckar
 
| caption = Show "Mannheim" & "Rottweil"
 
| skew=0.86
 
| label = Mannheim | label_size = <!-- 0-900%--> 82
 
  | lat=49.4890 | long=8.469
 
  | markhigh=8  | position=bottom
 
  | bg = <!--gold-->#CCCC11
 
| label2 = Rottweil | label2_size =103 | skew2=0.86
 
  | lat2_deg = 48 |lat2_min = 10 | pos2=bottom
 
  | lon2_deg = 08 |lon2_min = 37.5
 
  | bg2 = <!--bluegreen-->#66BBDD
 
| label3 = Anytown | label3_size =<!-- 0-900%--> 103
 
  | lat3_deg=49  | lat3_min=1.1 | pos3=top
 
  | lon3_deg=8.5 | lon3_min=0.0 | bg3 = <!--yellow-->#EEEE11
 
| float = right | width = 250
 
 
}}
 
}}
<code>
+
<pre style="overflow:auto">{{Location map | Germany Neckar
:<nowiki>{{Location map skew | GermanyNeckar</nowiki>
+
| width = 250 | float = right
:<nowiki>| Show "Mannheim" & "Rottweil"</nowiki>
+
| caption = Example using ''Location map''
:<nowiki>| skew=0.86</nowiki>
+
  | label = Rottweil | label_size = 90
:<nowiki>| label = Mannheim</nowiki>
+
  | background = #FFCC66 | position = top
::<nowiki>| label_size = <!-- 0-900%--> 82</nowiki>
+
  | lat_deg = 48 | lat_min = 10 |lat_sec = 05
::<nowiki> | lat=49.489 | long=8.469</nowiki>
+
  | lon_deg = 08 | lon_min = 37 |lon_sec = 29
::<nowiki> | marksize=7 | position=top</nowiki>
+
}}</pre>
::<nowiki> | bg = <!--gold-->#CCCC11</nowiki>
+
{{Clear right}}
:<nowiki>| label2=Rottweil | label2_size=103</nowiki>
+
=== Multiple markers on one map ===
::<nowiki>| skew2=0.86 | pos2=bottom</nowiki>
+
The example on the left shows the correct placement of locations when ''Germany Neckar'' is used with {{tl|Location map}}.
::<nowiki>  | lat2_deg=48 |lat2_min=10</nowiki>
 
::<nowiki> | lon2_deg=08 |lon2_min=37.5</nowiki>
 
::<nowiki>  | bg2 = <!--bluegreen-->#66BBDD</nowiki>
 
:<nowiki>| label3 = Anytown</nowiki>
 
::<nowiki>  | label3_size=93 | pos3=top</nowiki>
 
::<nowiki>  | lat3_deg=49  | lat3_min=1.1</nowiki>
 
::<nowiki>  | lon3_deg=8.5 | lon3_min=0.0</nowiki>
 
::<nowiki>  | bg3 = <!--yellow-->#EEEE11</nowiki>
 
:<nowiki>| float = right | width = 250</nowiki>
 
:<nowiki>}}</nowiki></code>
 
The map uses alternate [[Template:Location_map_skew]].
 
Note that the marker for "Mannheim" has been placed correctly now (had been ''west'' of the mark, due to narrow longitudes far north, on the non-equirectangular map).
 
{{-}}
 
<br clear=all/>
 
<div clear=all></div>
 
  
<!-- ---------------------------- Rottweil on Wrong Map -->
+
{{Location map many | Germany Neckar
<hr/>
+
| width = 250 | float = right
{{Location map
+
| caption = Example using ''Location map many''
| GermanyNeckar
+
| label = Mannheim | label_size = 110
| label = Rottweil  | position = top
+
  | bg = #CCCC11 | pos = bottom
| label_size = <!--percent 0-900%--> 128
+
  | lat_deg = 49.4890
| caption = "Rottweil" put on wrong-scale map
+
  | lon_deg = 8.469
| lat_deg=48 | lat_min=10
+
| label2 = Rottweil | label2_size = 100
| lon_deg=08 | lon_min=37.5
+
  | bg2 = #66BBDD | pos2 = top
| background = #FFFF99
+
  | lat2_deg = 48 | lat2_min = 10
| float = right  | width = 200
+
  | lon2_deg = 08 | lon2_min = 37.5
| AlternativeMap = Karte Deutschland.png
+
| label3 = Heilbronn | label3_size = 90
 +
  | bg3 = #FFFF99 | pos3 = top
 +
  | lat3_deg = 49 | lat3_min = 9
 +
  | lon3_deg = 09 | lon3_min = 13
 
}}
 
}}
Example labeling "[[Rottweil]]" on wrong-scale map:<code>
+
<pre style="overflow:auto">{{Location map many | Germany Neckar
:<nowiki>{{Location map</nowiki>
+
| width = 250 | float = right
:<nowiki>| GermanyNeckar</nowiki>
+
| caption = Example using ''Location map many''
:<nowiki>| label = Rottweil  | position = top</nowiki>
+
| label = Mannheim | label_size = 100
:<nowiki>| label_size = <!-- 0-900%--> 128</nowiki>
+
  | bg = #CCCC11 | pos = bottom
:<nowiki>| caption = "Rottweil" put on wrong-scale map</nowiki>
+
  | lat_deg = 49.4890
:<nowiki>| lat_deg=48 | lat_min=10</nowiki>
+
  | lon_deg = 8.469
:<nowiki>| lon_deg=08 | lon_min=37.5</nowiki>
+
| label2 = Rottweil | label2_size = 100
:<nowiki>| background = #FFFF99</nowiki>
+
  | bg2 = #66BBDD | pos2 = top
:<nowiki>| float = right</nowiki>
+
  | lat2_deg = 48 | lat2_min = 10
:<nowiki>| width = 200</nowiki>
+
  | lon2_deg = 08 | lon2_min = 37.5
:<nowiki>| AlternativeMap = Karte Deutschland.png</nowiki>
+
| label3 = Heilbronn | label3_size = 90
:<nowiki>}}</nowiki>
+
  | bg3 = #FFFF99 | pos3 = top
</code>
+
  | lat3_deg = 49 | lat3_min = 9
{{-}}
+
  | lon3_deg = 09 | lon3_min = 13
 
+
}}</pre>
== See also ==
+
{{Clear right}}
* [[Template:Location map GermanyRhine]]
+
| see also =  
* [[Template:Location map GermanyWeser]]
+
* [[Module:Location map/data/Germany]]
<includeonly>
+
* [[Module:Location map/data/Germany Rhine]]
<!-- CATEGORIES AND INTERWIKIS HERE, THANKS -->
+
* [[Module:Location map/data/Germany Weser]]
 
 
[[Category:Maps of Germany]]
 
 
 
<!--[[de:Vorlage:Positionskarte Deutschland]]-->
 
  
 +
}}<includeonly>
 +
<!-- CATEGORIES HERE, THANKS -->
 +
[[Category:Germany location map templates|Neckar]]
 +
[[Category:Maps of Germany|Neckar]]
 
</includeonly>
 
</includeonly>

Latest revision as of 06:47, 27 September 2020


Location map of Neckar
name Neckar
x (100*( ($2 - (9.67 + 8.0)/2)*((1 - 0.86)*($1 - 49.71)/(48.0 - 49.71) + 0.86) + (9.67 + 8.0)/2 - 8.0)/(9.67 - 8.0))
y (100*($1 - 49.71)/(48.0 - 49.71))
image Neckar_watershed_closer.gif
Neckar watershed closer.gif


Module:Location map/data/Germany Neckar is a location map definition used to overlay markers and labels on an equirectangular projection map of Neckar. The markers are placed by latitude and longitude coordinates on the default map or a similar map image.

Usage

These definitions are used by the following templates when invoked with parameter "Germany Neckar":

Map definition

  • name = Neckar
    Name used in the default map caption
  • x = (100*( ($2 - (9.67 + 8.0)/2)*((1 - 0.86)*($1 - 49.71)/(48.0 - 49.71) + 0.86) + (9.67 + 8.0)/2 - 8.0)/(9.67 - 8.0))
    An expression to calculate a location on the map via its longitude; evaluates as 0 along the left edge and 100 along the right edge
  • y = (100*($1 - 49.71)/(48.0 - 49.71))
    An expression to calculate a location on the map via its latitude; evaluates as 0 along the top edge and 100 along the bottom edge


Examples using location map templates

Mannheim

The example on the left shows the correct placement of Mannheim when Germany Neckar is used with {{Location map}}.

Note that the marker for "Mannheim" is west of the mark, due to narrow longitudes far north (on non-equirectangular map). Longitude lines converge to the center, so center towns would be positioned more accurately. The "polar" skew factor should be used (as in Template:Location map) to scale longitude smaller near polar latitudes (relative to map height), and position longitudes from map center, rather than left-side base longitude (see example below).

Mannheim is located in Neckar
Mannheim
Mannheim
Example using Location map
{{Location map | Germany Neckar
 | width = 250 | float = right
 | caption = Example using ''Location map''
 | label = Mannheim | label_size = 90
 | background = #CCCC11 | position = bottom
 | lat_deg = 49.4890
 | lon_deg = 8.4691
 }}

Rottweil

The example shows the correct placement of Rottweil when Germany Neckar is used with {{Location map}}.

Rottweil is located in Neckar
Rottweil
Rottweil
Example using Location map
{{Location map | Germany Neckar
 | width = 250 | float = right
 | caption = Example using ''Location map''
 | label = Rottweil | label_size = 90
 | background = #FFCC66 | position = top
 | lat_deg = 48 | lat_min = 10 |lat_sec = 05
 | lon_deg = 08 | lon_min = 37 |lon_sec = 29
 }}

Multiple markers on one map

The example on the left shows the correct placement of locations when Germany Neckar is used with {{Location map}}.

Location map/data/Germany Neckar/doc is located in Neckar
Mannheim
Mannheim
Rottweil
Rottweil
Heilbronn
Heilbronn
Example using Location map many
{{Location map many | Germany Neckar
 | width = 250 | float = right
 | caption = Example using ''Location map many''
 | label = Mannheim | label_size = 100
   | bg = #CCCC11 | pos = bottom
   | lat_deg = 49.4890
   | lon_deg = 8.469
 | label2 = Rottweil | label2_size = 100
   | bg2 = #66BBDD | pos2 = top
   | lat2_deg = 48 | lat2_min = 10
   | lon2_deg = 08 | lon2_min = 37.5
 | label3 = Heilbronn | label3_size = 90
   | bg3 = #FFFF99 | pos3 = top
   | lat3_deg = 49 | lat3_min = 9
   | lon3_deg = 09 | lon3_min = 13
 }}

See also

Location map templates

Creating new map definitions