Widget:TChartlet static grid
From CruisersWiki
(Difference between revisions)
(2 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | <includeonly><!--{* | + | <includeonly><!--{* after https://github.com/dfacts/staticmaplite/blob/master/staticmap.php *}--><!--{* |
convert coordinates to degrees | convert coordinates to degrees | ||
*}--><!--{ | *}--><!--{ | ||
- | 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":"" |
}--><!--{* | }--><!--{* | ||
Line 82: | Line 82: | ||
' | ' | ||
src='`$url`' | src='`$url`' | ||
+ | alt='' | ||
>"}--><!--{ | >"}--><!--{ | ||
/section}--><!--{ | /section}--><!--{ |
Latest revision as of 13:45, 3 March 2019
Generates static tile grid for Template:Chartlet static