Widget:TChartlet static grid

From CruisersWiki

(Difference between revisions)
Jump to: navigation, search
 
(2 intermediate revisions not shown)
Line 1: Line 1:
-
<includeonly><!--{* see Template:Chartlet static *}--><!--{*
+
<includeonly><!--{* after https://github.com/dfacts/staticmaplite/blob/master/staticmap.php *}--><!--{*
   convert coordinates to degrees
   convert coordinates to degrees
*}--><!--{
*}--><!--{
-
assign var='c' value=$lat}--><!--{
+
assign var=lat value=$lat|default:41.2462244}--><!--{
-
assign var='d' value=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{
+
assign var='d' value=$lat|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{
-
if $d != $c}--><!--{
+
if $d != $lat}--><!--{
-
   math assign='d' equation="$d+m/60" m=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{
+
   math assign='d' equation="$d+m/60" m=$lat|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{
-
   assign var='h' value=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\3"}--><!--{
+
   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='c' value=$lon}--><!--{
+
assign var=lon value=$lon|default:9.1974878}--><!--{
-
assign var='d' value=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{
+
assign var='d' value=$lon|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{
-
if $d != $c}--><!--{
+
if $d != $lon}--><!--{
-
   math assign='d' equation="$d+m/60" m=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{
+
   math assign='d' equation="$d+m/60" m=$lon|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{
-
   assign var='h' value=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\3"}--><!--{
+
   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

Personal tools
advertisement
Friends of Cruisers Wiki