Vorlage

Positionskarte: Unterschied zwischen den Versionen

Aus VolynWiki

K
K
Zeile 2: Zeile 2:
 
__NOTOC__
 
__NOTOC__
  
{{Positionskarte| GW | 50.587658 | 27.626066 | Zwiahel | 300}}
+
<div style="float:right; border:solid 2px #888; margin:0 0 5px 5px; padding:0 1px 5px 1px">
 
+
{{Positionskarte| GW | 50.589 | 27.624 | Zwiahel}}
 
 
<div style="float:right; border:solid 2px #888; margin:5px; padding:5px">
 
{{Positionskarte| DE | 53.55 | 9.99 | Hamburg | 250}}
 
 
<br clear="both">
 
<br clear="both">
'''Beispielkarte Hamburg'''
+
'''Beispielkarte Nowograd Wolynsk'''
 
</div>
 
</div>
  
Zeile 48: Zeile 45:
  
  
; Beispiele: <tt><nowiki>{{Positionskarte| FR | 48.86 | 2.33 | Paris | 200}}</nowiki></tt>
+
; Beispiele: <tt><nowiki>{{Positionskarte| GW | 50.589 | 27.624 | Zwiahel | 200}}</nowiki></tt>
 
:<tt><nowiki>{{Positionskarte| DE | 53.55 | 9.99 | Hamburg | 200}}</nowiki></tt>
 
:<tt><nowiki>{{Positionskarte| DE | 53.55 | 9.99 | Hamburg | 200}}</nowiki></tt>
 
:<tt><nowiki>{{Positionskarte| DE | {{Deg2Dez|53|33|0|N}} | {{Deg2Dez|10|0|0|E}} | Hamburg | 200}}</nowiki></tt>
 
:<tt><nowiki>{{Positionskarte| DE | {{Deg2Dez|53|33|0|N}} | {{Deg2Dez|10|0|0|E}} | Hamburg | 200}}</nowiki></tt>
Zeile 63: Zeile 60:
 
|-  
 
|-  
 
|  '''DE''' || Deutschland || [[Bild:Germany map modern.png|100px]]
 
|  '''DE''' || Deutschland || [[Bild:Germany map modern.png|100px]]
|-
 
|  '''NGW''' || Oblast Nowograd Wolynsk || [[Bild:1821 Nowograd.png|100px]]
 
|-
 
|  '''TE''' || Test || [[Bild:test.png|100px]]
 
|-
 
 
|}
 
|}
 
</noinclude>
 
</noinclude>
Zeile 74: Zeile 66:
  
 
{{#switch: {{{1}}}
 
{{#switch: {{{1}}}
| DE_alt = {{Positionskarte_allg|map=MapGermany_leer.PNG
 
                            |mapsize={{{5|300}}}         
 
                            |lat={{{2}}}
 
                            |long={{{3}}}
 
                            |caption={{{4}}}
 
                            |left=3.99782208
 
                            |top=55.26903621
 
                            |factlat=-0.1280624652
 
                            |factlong=0.07742139676}}
 
 
 
| DE = {{Positionskarte_allg|map=Germany map modern.png
 
| DE = {{Positionskarte_allg|map=Germany map modern.png
 
                             |mapsize={{{5|300}}}           
 
                             |mapsize={{{5|300}}}           
Zeile 93: Zeile 75:
 
                             |factlat=-0.11803462899
 
                             |factlat=-0.11803462899
 
                             |factlong=0.08866101825}}
 
                             |factlong=0.08866101825}}
 
| NGW = {{Positionskarte_allg|map=1821 Nowograd.png
 
                            |mapsize={{{5|300}}}         
 
                            |lat={{{2}}}
 
                            |long={{{3}}}
 
                            |caption={{{4}}}
 
                            |top=51.2
 
                            |left=27.1
 
                            |factlat=-0.6666666666666666
 
                            |factlong=0.9090909090909091}}
 
  
 
| GW = {{Positionskarte_allg|map=1821 gubernia.png
 
| GW = {{Positionskarte_allg|map=1821 gubernia.png
Zeile 112: Zeile 84:
 
                             |left=23.6
 
                             |left=23.6
 
                             |factlat=-0.2777777777777778
 
                             |factlat=-0.2777777777777778
                             |factlong=0.1923076923076923}}
+
                             |factlong=0.3}}
 
 
| TE = {{Positionskarte_allg|map=test.png
 
                            |mapsize={{{5|300}}}         
 
                            |lat={{{2}}}
 
                            |long={{{3}}}
 
                            |caption={{{4}}}
 
                            |top=52
 
                            |left=24
 
                            |factlat=-0.25
 
                            |factlong=0.2}}
 
  
 
}}
 
}}

Version vom 6. November 2009, 15:34 Uhr



{{#switch: GW | GW =

Lage von Zwiahel
Zwiahel
Zwiahel
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}


| USH =

Lage von Zwiahel
Zwiahel
Zwiahel
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}


| TE =

Lage von Zwiahel
Zwiahel
Zwiahel
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}


| WR =

Lage von Zwiahel
Zwiahel
Zwiahel
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}


| DE =

Lage von Zwiahel
Zwiahel
Zwiahel
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|Zwiahel]]
}}

}}
Beispielkarte Nowograd Wolynsk

Funktion
Die Vorlage Positionskarte erzeugt eine Landkarte mit einem roten Punkt, der die Position eines Ortes in dieser Karte markiert.
Verwendung
{{Positionskarte| <Ländercode> | <geogr.Breite> | <geogr.Länge> | <Ortsname> | <Breite>}}
Parameter
  • Ländercode → Legt die verwendete Karte fest. Mögliche Codes siehe Tabelle weiter unten.
  • geogr.Breite → die geographische Breite des zu markierenden Ortes...
  • geogr.Länge → die geographische Länge des zu markierenden Ortes...
    ... in Dezimalschreibweise, d.h. z.B. "45.5", nicht "45 30 00". Für südliche und westliche Koordinaten sind negative Zahlen zu verwenden, also "-73.6", nicht "73.6W". Sollen die Koordinaten in der üblichen Grad/Minuten/Sekunden-Schreibweise angegeben werden kann die Vorlage Deg2Dez verwendet werden (siehe dort oder Beispiel unten).
  • Ortsname → der Name des Ortes, er erscheint, wenn man sich mit der Maus über dem roten Punkt befindet. In einer späteren Version evtl. auch unter dem roten Punkt.
  • Breite → Breite der Karte in px, aber ohne "px"! Optional, default ist 300px.


  • map → defines a map image to use. Note that the projection of the map is important. Parallels and meridians have to be straight and perpendicular to each other, as e.g. in the Mercator Projection.
  • mapsize → the width of the map image in px, but do not add "px". Default is 250.
  • lat → latitude of the red dot.
  • long → longitude of the red dot.
  • caption → if you move the mouse cursor over the red dot you will see this text.
  • top → the latitude of the top edge of the map image.
  • left → the longitude of the left edge of the map image.
  • factlat and factlong → factors that tell the template how to position the marker. See below how to calculate them.

Calculation of factlat and factlong

To calculate the values you have to know the latitudes and longitudes of the edges of the map image. If the width and the length of the image differ, you also need to know the sizes of the original image. It is also possible to do the calculations if you know the position of two landmarks on the map, but this can only be done with reasonable effort using an excel-sheet, please contact Flip666 in this case.

If width and height are the same:

  • factlat = 1 / ( latitude of bottom edge - latitude of top edge )
  • factlong = 1 / ( longitude of right edge - longitude of left edge )

If width and height differ factlat has to be corrected:

  • do the calculations as above
  • divide factlat by the image width and multiply it by the image height


Beispiele
{{Positionskarte| GW | 50.589 | 27.624 | Zwiahel | 200}}
{{Positionskarte| DE | 53.55 | 9.99 | Hamburg | 200}}
{{Positionskarte| DE | {{Deg2Dez|53|33|0|N}} | {{Deg2Dez|10|0|0|E}} | Hamburg | 200}}


gültige Ländercodes

Europa

Code Land Karte
GW Gouvernement Wolhynien 1821 1821 gubernia.png
DE Deutschland Germany map modern.png



{{#switch: {{{1}}} | DE =

Lage von {{{4}}}
{{{4}}}
{{{4}}}
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}


| GW =

Lage von {{{4}}}
{{{4}}}
{{{4}}}
{{#if:|
[[Image:{{{insetLL}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}{{#if:|
[[Image:{{{insetUR}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}{{#if:|
[[Image:{{{insetLR}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}{{#if:|
[[Image:{{{insetUL}}}|{{{insetsize}}}px|noframe|{{{4}}}]]
}}


}}