Widget:TChartlet static grid
From CruisersWiki
(Difference between revisions)
Line 4: | Line 4: | ||
*}--><!--{ | *}--><!--{ | ||
- | assign var= | + | assign var=lat value=$lat|default:41.2462244}--><!--{ |
- | assign var='d' value=$ | + | assign var='d' value=$lat|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{ |
- | if $d != $ | + | if $d != $lat}--><!--{ |
- | math assign='d' equation="$d+m/60" m=$ | + | math assign='d' equation="$d+m/60" m=$lat|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{ |
- | assign var='h' value=$ | + | assign var='h' value=$lat|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\3"}--><!--{ |
if $h == 's' || $h == 'S' || $h == 'w' || $h == 'W'}--><!--{ | if $h == 's' || $h == 'S' || $h == 'w' || $h == 'W'}--><!--{ | ||
math assign='d' equation="-$d"}--><!--{ | math assign='d' equation="-$d"}--><!--{ | ||
Line 14: | Line 14: | ||
assign var='lat' value=$d}--><!--{ | assign var='lat' value=$d}--><!--{ | ||
/if}--><!--{ | /if}--><!--{ | ||
- | assign var= | + | assign var=lon value=$lon|default:9.1974878}--><!--{ |
- | assign var='d' value=$ | + | assign var='d' value=$lon|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{ |
- | if $d != $ | + | if $d != $lon}--><!--{ |
- | math assign='d' equation="$d+m/60" m=$ | + | math assign='d' equation="$d+m/60" m=$lon|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{ |
- | assign var='h' value=$ | + | assign var='h' value=$lon|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\3"}--><!--{ |
if $h == 's' || $h == 'S' || $h == 'w' || $h == 'W'}--><!--{ | if $h == 's' || $h == 'S' || $h == 'w' || $h == 'W'}--><!--{ | ||
math assign='d' equation="-$d"}--><!--{ | math assign='d' equation="-$d"}--><!--{ | ||
Line 24: | Line 24: | ||
assign var='lon' value=$d}--><!--{ | assign var='lon' value=$d}--><!--{ | ||
/if}--><!--{ | /if}--><!--{ | ||
- | assign var='width' value=$width|replace:"px":"" | + | assign var='width' value=$width|default:350|replace:"px":"" |
}--><!--{ | }--><!--{ | ||
- | assign var='height' value=$height|replace:"px":"" | + | assign var='height' value=$height|default:350|replace:"px":"" |
}--><!--{* | }--><!--{* | ||
Revision as of 10:30, 19 November 2018
Generates static tile grid for Template:Chartlet static