[% IF map.cols %]
[% INCLUDE 'maps/_compass.html' %]
[% ELSE %]
[% INCLUDE 'maps/_compass.html' %]
[% END %] [% BLOCK pin %] [% SET pin_top = pin.py / ( map.tile_size * map.rows ) * 100; SET pin_left = pin.px / ( map.tile_size * map.cols ) * 100; # -24px half of 48px wide image, -64px all of 64px tall image INCLUDE 'maps/pin.html' pin_style = 'top:' _ pin_top _ '%; left:' _ pin_left _ '%; position:absolute; margin-left:-24px; margin-top:-64px;' %] [% END %]