Widget:Chartlet static
From CruisersWiki
(Difference between revisions)
m |
|||
(8 intermediate revisions not shown) | |||
Line 1: | Line 1: | ||
- | <includeonly><!--{ | + | <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"}--><!--{ | ||
Line 23: | Line 23: | ||
assign var='h' value=$height|replace:"px":"" | assign var='h' value=$height|replace:"px":"" | ||
}--><!--{ | }--><!--{ | ||
- | assign var='style' value="width:`$width | + | 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