Widget:Chartlet static
From CruisersWiki
(Difference between revisions)
(staticmap.openstreetmap.de) |
|||
Line 23: | Line 23: | ||
assign var='h' value=$height|replace:"px":"" | assign var='h' value=$height|replace:"px":"" | ||
}--><!--{ | }--><!--{ | ||
- | assign var=' | + | 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><!--{* | ||
+ | |||
+ | no sure why it so, but noscript to be repeated, otherwise every other instance is not rendered | ||
+ | |||
+ | *}--><noscript></noscript></includeonly><noinclude> | ||
+ | |||
+ | <!--------------------------------------------> | ||
see [[Template:Chartlet static]] | see [[Template:Chartlet static]] | ||
Line 30: | 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> |
Revision as of 11:05, 15 November 2018