Sjabloon:Geoshiftcode: verschil tussen versies

 
(19 tussenliggende versies door dezelfde gebruiker niet weergegeven)
Regel 9: Regel 9:
 
</pre>
 
</pre>
 
Edit the page to see the template text.
 
Edit the page to see the template text.
</noinclude><includeonly><div style="display:none;">
+
</noinclude><includeonly>
{{#vardefine:varRad|0.01}}
+
{{#vardefine:varRad|0.00003}}
{{#vardefine:varAng|175*pi/180}}
+
{{#vardefine:varAng|80*pi/180}}
 
 
 
{{#vardefine:varN|{{#explode:{{PAGENAME}}| |-1}}}}
 
{{#vardefine:varN|{{#explode:{{PAGENAME}}| |-1}}}}
  +
<!--
 
n = {{#var:varN}}
 
n = {{#var:varN}}
 
+
-->
{{#vardefine:varX|{{#expr: {{#var:varRad}} * sin( {{#var:varN}} * {{#var:varAng}} )}}}}
+
{{#vardefine:varX|{{#expr: {{#var:varRad}} * cos( {{#var:varN}} * {{#var:varAng}} )}}}}
{{#vardefine:varY|{{#expr: {{#var:varRad}} * cos( {{#var:varN}} * {{#var:varAng}} )}}}}
+
{{#vardefine:varY|{{#expr: {{#var:varRad}} * sin( {{#var:varN}} * {{#var:varAng}} )}}}}
 
+
<!--
 
x = {{#var:varX}} <br />
 
x = {{#var:varX}} <br />
 
y = {{#var:varY}}
 
y = {{#var:varY}}
 
+
-->
 
{{#vardefine:varGC|{{#geocode:{{{Location|}}}|format=float|directional=no}}}}
 
{{#vardefine:varGC|{{#geocode:{{{Location|}}}|format=float|directional=no}}}}
 
{{#vardefine:varGCX|{{#explode:{{#var:varGC}}|,|0}}}}
 
{{#vardefine:varGCX|{{#explode:{{#var:varGC}}|,|0}}}}
 
{{#vardefine:varGCY|{{#explode:{{#var:varGC}}|,|1}}}}
 
{{#vardefine:varGCY|{{#explode:{{#var:varGC}}|,|1}}}}
 
+
<!--
 
gc  = {{#var:varGC}} <br />
 
gc  = {{#var:varGC}} <br />
 
gcx = {{#var:varGCX}} <br />
 
gcx = {{#var:varGCX}} <br />
 
gcy = {{#var:varGCY}}
 
gcy = {{#var:varGCY}}
</div>
+
-->
 
{{#expr:{{#var:varGCX}} + {{#var:varX}}}}, {{#expr:{{#var:varGCY}} + {{#var:varY}}}}
 
{{#expr:{{#var:varGCX}} + {{#var:varX}}}}, {{#expr:{{#var:varGCY}} + {{#var:varY}}}}
 
</includeonly>
 
</includeonly>

Huidige versie van 20 nov 2016 om 23:17

This is the "Geoshiftcode" template. It should be called in the following format:

{{Geoshiftcode
|Location=
}}

Edit the page to see the template text.