Template:Geo coord

From CruisersWiki

(Difference between revisions)
Jump to: navigation, search
 
(28 intermediate revisions not shown)
Line 1: Line 1:
-
<includeonly> 1 2 3 <!--
+
<includeonly><!--
-
--><span class="plainlinks nourlexpansion noexternal"><!--
+
--><span class="plainlinks nourlexpansion noexternal" title="Chartlet"><!--
-
  -->{{fullurl:MediaWiki:Chartlet}}#lat={{urlencode:{{?|test={{{lat|}}}|{{{lat}}}|{{{1|}}}_{{{2|}}}_{{{3|}}}}}}}{{!}}lon={{urlencode:{{?|test={{{lon|}}}|{{{lon}}}|{{{4|}}}_{{{5|}}}_{{{6|}}}}}}}{{!}}zoom={{urlencode:{{{zoom|}}}}}{{!}}layer=T{{!}}page={{FULLPAGENAMEE}} 123 <span>{{if |test={{{lat|}}}
+
-->{{Geo link
-
    | then={{#widget:Deg2Dmh|lat={{{lat}}}|lon={{{lon}}}}}
+
  | lat= {{?|test={{{maplat|}}}|{{{maplat}}}|{{{lat}}}}}
-
    | else={{{1}}}°{{{2}}}′{{{3}}}, {{{4}}}°{{{5}}}′{{{6}}}
+
  | lon= {{?|test={{{maplon|}}}|{{{maplon}}}|{{{lon}}}}}
 +
  | zoom= {{{zoom|}}}
 +
  | deg2dmh= y
   }}<!--
   }}<!--
-
  --></span><!--
 
   microformat
   microformat
-
  --><span class="p-category" style="display:none">{{{type|other}}}</span><!--
 
   --><span class="p-geo h-geo" style="display:none"><!--
   --><span class="p-geo h-geo" style="display:none"><!--
-
     -->{{if|test={{{name|}}}|then=<span class="p-name">{{{name}}}</span>}}<!--
+
     --><span class="p-name">{{{name|}}}</span><!--  
-
     --><span class="p-latitude">{{?|test={{{lat|}}}|{{{lat}}}|{{#widget:Dmh2Deg|d={{{1}}}|m={{{2}}}|h={{{3}}}}}}}</span>;<!--
+
     --><span class="p-latitude">{{?|test={{{lat|}}}|{{Dmh2Deg|c={{{lat}}}}}}}</span>;<!--
-
     --><span class="p-longitude">{{?|test={{{lon|}}}|{{{lon}}}|{{#widget:Dmh2Deg|d={{{4}}}|m={{{5}}}|h={{{6}}}}}}}</span><!--
+
    --><span class="p-longitude">{{?|test={{{lon|}}}|{{Dmh2Deg|c={{{lon}}}}}}}</span><!--
 +
     -->{{if
 +
        | test= {{{geometry|}}}
 +
        | then= {{|}}<span class="p-geometry">{{urlencode:{{if
 +
            | test= {{eq|y|{{{geometry}}}}}
 +
            | then= {{:{{FULLPAGENAME}}/geometry | name= {{{name|}}} }}
 +
            | else= {{{geometry}}}}}
 +
            }}</span>
 +
        }}<!--
   --></span><!-- h-geo
   --></span><!-- h-geo
-
--></span><!-- plainlinks nourlexpansion noexternal
+
--></span><!--
--></includeonly><noinclude>
--></includeonly><noinclude>
-
TEST
+
An axillary template to produce coordinates and a chartlet link for [[Template:Poi]], [[Template:Infobox]] and similar.
-
<!--
+
-
This template produces a link to a list of map sources, based on the geographical coordinates and other parameters, and provides a standardized notation for the coordinates.
 
-
 
-
The template is for geographical latitude and longitude coordinates on Earth, expressed in degrees and minutes.
 
-
 
-
== Usage ==
 
-
 
-
'''[[Template:Coord]] style:'''
 
-
<nowiki>{{</nowiki>Poi coord|''DD''|''M.M''|''N/S''|''DD''|''M.M''|''E/W''|}}
 
-
 
-
Example:
 
-
<pre><nowiki>
 
-
{{Poi coord|37|43.6|N|26|50.6|W}}
 
-
{{Poi coord|37|43.6|N|26|50.6|W|noicon=yes}}
 
-
{{Poi coord|37|43.6|N|26|50.6|W|nocoord=yes}}
 
-
{{Poi coord}}
 
-
</nowiki></pre>
 
-
 
-
Gives:
 
-
:{{Poi coord|37|43.6|N|26|50.6|W}}
 
-
:{{Poi coord|37|43.6|N|26|50.6|W|noicon=yes}}
 
-
:{{Poi coord|37|43.6|N|26|50.6|W|nocoord=yes}}
 
-
:{{Poi coord}}
 
-
 
-
 
-
'''Lat, Lon style:'''
 
-
<pre><nowiki>
 
-
{{Poi coord|lat=-10.123456789|lon=-2.987654321}}
 
-
{{Poi coord|lat=-10.123456789|lon=-2.987654321|noicon=yes}}
 
-
</nowiki></pre>
 
-
 
-
Gives:
 
-
:{{Poi coord|lat=-10.123456789|lon=-2.987654321}}
 
-
:{{Poi coord|lat=-10.123456789|lon=-2.987654321|noicon=yes}}
 
-
 
-
[[Category:Templates|Poi coord]]
 
-
-->
 
</noinclude>
</noinclude>

Latest revision as of 15:30, 16 May 2017


An axillary template to produce coordinates and a chartlet link for Template:Poi, Template:Infobox and similar.


Personal tools
advertisement
Friends of Cruisers Wiki