aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-09-15 12:41:44 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-09-15 16:20:02 +0100
commit0deb52d82c31766a3141941334e5f4f11bfc77e1 (patch)
tree9c35157a25d98a4f900e1db88160dbc46a3c2cac
parent79bbef3a3e21436afbb1d6e70a04eb48c09994f5 (diff)
[Zurich] Stop non-WMTS maps erroring.
The Zurich noscript map assumes a WMTS map data setup.
-rw-r--r--templates/web/zurich/maps/noscript_map.html30
1 files changed, 30 insertions, 0 deletions
diff --git a/templates/web/zurich/maps/noscript_map.html b/templates/web/zurich/maps/noscript_map.html
index dcd577c52..4925f9260 100644
--- a/templates/web/zurich/maps/noscript_map.html
+++ b/templates/web/zurich/maps/noscript_map.html
@@ -1,3 +1,4 @@
+[% IF map.cols %]
<div class="noscript square-map__outer">
<div class="square-map__inner">
<div id="[% nsm_prefix %]drag">
@@ -19,6 +20,35 @@
[% INCLUDE 'maps/_compass.html' %]
</div>
</div>
+[% ELSE %]
+<div class="noscript">
+ <div id="[% nsm_prefix %]drag">
+ <[% map.img_type %]
+ alt="NW map tile" id="[% nsm_prefix %]t2.2"
+ name="tile_[% map.x_tile - 1 %].[% map.y_tile - 1 %]"
+ src="[% map.tiles.0 %]"
+ style="top:0; left:0;">
+ <[% map.img_type %]
+ alt="NE map tile" id="[% nsm_prefix %]t2.3"
+ name="tile_[% map.x_tile %].[% map.y_tile - 1 %]"
+ src="[% map.tiles.1 %]"
+ style="top:0px; left:256px;">
+ <br>
+ <[% map.img_type %]
+ alt="SW map tile" id="[% nsm_prefix %]t3.2"
+ name="tile_[% map.x_tile - 1 %].[% map.y_tile %]"
+ src="[% map.tiles.2 %]"
+ style="top:256px; left:0;">
+ <[% map.img_type %]
+ alt="SE map tile" id="[% nsm_prefix %]t3.3"
+ name="tile_[% map.x_tile %].[% map.y_tile %]"
+ src="[% map.tiles.3 %]"
+ style="top:256px; left:256px;">
+ </div>
+ <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE 'maps/pin.html' %][% END %]</div>
+ [% INCLUDE 'maps/_compass.html' %]
+</div>
+[% END %]
[% BLOCK pin %]
[%