Widget:Chartlet static

From CruisersWiki

(Difference between revisions)
Jump to: navigation, search
m
 
(13 intermediate revisions not shown)
Line 1: Line 1:
-
<includeonly><!--{$lat}-->,<!--{$lon}-->
+
<includeonly><!--{* see Template:Chartlet static *}--><!--{
-
<!--{
+
assign var='c' value=$lat}--><!--{
assign var='c' value=$lat}--><!--{
-
assign var='d' value=$c|regex_replace:"/([^ ]+)_([^ ]+)_([^ ]+)/":"\\1"}--><!--{
+
assign var='d' value=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{
if $d != $c}--><!--{
if $d != $c}--><!--{
-
   math assign='d' equation="d+m/60" d=$d m=$c|regex_replace:"/([^ ]+)_([^ ]+)_([^ ]+)/":"\\2"}--><!--{
+
   math assign='d' equation="d+m/60" d=$d m=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{
-
   assign var='h' value=$c|regex_replace:"/([^ ]+)_([^ ]+)_([^ ]+)/":"\\3"}--><!--{
+
   assign var='h' value=$c|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*(-1)" d=$lat}--><!--{
     math assign='d' equation="d*(-1)" d=$lat}--><!--{
Line 12: Line 11:
/if}--><!--{
/if}--><!--{
assign var='c' value=$lon}--><!--{
assign var='c' value=$lon}--><!--{
-
assign var='d' value=$c|regex_replace:"/([^ ]+)_([^ ]+)_([^ ]+)/":"\\1"}--><!--{
+
assign var='d' value=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\1"}--><!--{
if $d != $c}--><!--{
if $d != $c}--><!--{
-
   math assign='d' equation="d+m/60" d=$d m=$c|regex_replace:"/([^ ]+)_([^ ]+)_([^ ]+)/":"\\2"}--><!--{
+
   math assign='d' equation="d+m/60" d=$d m=$c|regex_replace:"/([^ ]+) ([^ ]+) ([^ ]+)/":"\\2"}--><!--{
-
   assign var='h' value=$c|regex_replace:"/([^ ]+)_([^ ]+)_([^ ]+)/":"\\3"}--><!--{
+
   assign var='h' value=$c|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*(-1)" d=$lat}--><!--{/if}--><!--{
     math assign='d' equation="d*(-1)" d=$lat}--><!--{/if}--><!--{
Line 23: Line 22:
}--><!--{
}--><!--{
assign var='h' value=$height|replace:"px":""
assign var='h' value=$height|replace:"px":""
-
}--><div class="chartlet-static"  style="width:<!--{$width}-->; height:<!--{$height}-->; background-image:url(https://maps.wikimedia.org/img/osm-intl,<!--{$zoom}-->,<!--{$lat}-->,<!--{$lon}-->,<!--{$w}-->x<!--{$h}-->.png)"></div></includeonly><noinclude>
+
}--><!--{
 +
assign var='url' value="http://staticmap.openstreetmap.de/staticmap.php?center=`$lat`,`$lon`&zoom=`$zoom`&size=`$w`x`$h`&maptype=mapnik"|escape
 +
}--><!--{
 +
assign var='style' value="width:`$width`; height:`$height`; background-image:url($url)"|escape
 +
}--><noscript><img class="chartlet-static"  src="<!--{$url}-->"></noscript><!--{*
 +
 
 +
for whatever reason every other instance of <noscript> does not work, so it is to be repeated
 +
 
 +
*}--><noscript></noscript></includeonly><noinclude>
 +
 
 +
<!-------------------------------------------->
 +
 
 +
see [[Template:Chartlet static]]
 +
 
 +
<div style="display:none"> <!-- the following is a comment -->
 +
 
 +
*** https://wiki.openstreetmap.org/wiki/StaticMapLite
 +
 
 +
div class="chartlet-static"  style="width:<!--{$width}-->; height:<!--{$height}-->; background-image:url(http://staticmap.openstreetmap.de/staticmap.php?center=<!--{$lat}-->,<!--{$lon}-->&zoom=<!--{$zoom}-->&size=<!--{$w}-->x<!--{$h}-->&maptype=mapnik)"
 +
 
 +
img class="chartlet-static"  src="<!--{$url}-->"
 +
 
 +
*** wikimedia
 +
 
 +
div class="chartlet-static"  style="width:<!--{$width}-->; height:<!--{$height}-->; background-image:url(https://maps.wikimedia.org/img/osm-intl,<!--{$zoom}-->,<!--{$lat}-->,<!--{$lon}-->,<!--{$w}-->x<!--{$h}-->.png)"
 +
 
 +
assign var='url' value=https://maps.wikimedia.org/img/osm-intl,`$zoom`,`$lat`,`$lon`,`$w`x`$h`.png
-
<noinclude>
+
</div>
 +
</noinclude>

Latest revision as of 13:28, 15 November 2018


see Template:Chartlet static

div class="chartlet-static" style="width:; height:; background-image:url(http://staticmap.openstreetmap.de/staticmap.php?center=,&zoom=&size=x&maptype=mapnik)"

img class="chartlet-static" src=""

      • wikimedia

div class="chartlet-static" style="width:; height:; background-image:url(https://maps.wikimedia.org/img/osm-intl,,,,x.png)"

assign var='url' value=https://maps.wikimedia.org/img/osm-intl,`$zoom`,`$lat`,`$lon`,`$w`x`$h`.png

Personal tools
advertisement
Friends of Cruisers Wiki