Widget:TChartlet static
From CruisersWiki
(Difference between revisions)
(12 intermediate revisions not shown) | |||
Line 23: | Line 23: | ||
assign var='h' value=$height|replace:"px":"" | assign var='h' value=$height|replace:"px":"" | ||
}--><!--{ | }--><!--{ | ||
- | assign var='url' value= | + | 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 | assign var='style' value="width:`$width`; height:`$height`; background-image:url($url)"|escape | ||
- | }--><img class="chartlet-static" src="<!--{$url}-->"></includeonly><noinclude> | + | }--><noscript><img class="chartlet-static" src="<!--{$url}-->"></noscript><!--{* |
+ | |||
+ | no sure why it so, but noscript to be repeated, otherwise every other instance is not rendered | ||
+ | |||
+ | *}--><noscript></noscript></includeonly><noinclude> | ||
<!--------------------------------------------> | <!--------------------------------------------> | ||
Line 34: | Line 38: | ||
<div style="display:none"> <!-- the following is a comment --> | <div style="display:none"> <!-- the following is a comment --> | ||
- | https://wiki.openstreetmap.org/wiki/StaticMapLite | + | *** 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)" | 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)" | ||
- | wikimedia | + | 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)" | 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 | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Latest revision as of 16:33, 18 November 2018