aboutsummaryrefslogtreecommitdiffstats
path: root/templates/web/base/maps
diff options
context:
space:
mode:
Diffstat (limited to 'templates/web/base/maps')
-rw-r--r--templates/web/base/maps/noscript_map_wmts.html32
-rw-r--r--templates/web/base/maps/openlayers.html3
-rw-r--r--templates/web/base/maps/wmts.html4
3 files changed, 38 insertions, 1 deletions
diff --git a/templates/web/base/maps/noscript_map_wmts.html b/templates/web/base/maps/noscript_map_wmts.html
new file mode 100644
index 000000000..987aa76a6
--- /dev/null
+++ b/templates/web/base/maps/noscript_map_wmts.html
@@ -0,0 +1,32 @@
+<div class="noscript square-map__outer">
+ <div class="square-map__inner">
+ <div id="[% nsm_prefix %]drag">
+ [%- FOR row IN map.tiles -%]
+ [%- FOR tile IN row -%]
+ [%- top_px = tile.row_offset * map.tile_size -%]
+ [%- left_px = tile.col_offset * map.tile_size %]
+ <[% map.img_type %]
+ class="square-map__tile"
+ alt="[% tile.alt %]"
+ id="[% nsm_prefix %]t[% tile.dotted_id %]"
+ name="tile_[% tile.dotted_id %]"
+ src="[% tile.src %]"
+ style="width: [% 100 / map.cols %]%; height: auto; float: left;">
+ [%- END -%]
+ [% END %]
+ </div>
+ <div id="[% nsm_prefix %]pins">[% FOR pin IN map.pins %][% INCLUDE pin %][% END %]</div>
+ [% INCLUDE 'maps/_compass.html' %]
+ </div>
+</div>
+
+[% 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 %]
+
diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html
index 2f748cb19..02f6cb131 100644
--- a/templates/web/base/maps/openlayers.html
+++ b/templates/web/base/maps/openlayers.html
@@ -33,7 +33,8 @@
<div id="map_box" aria-hidden="true">
[% pre_map %]
<div id="map">
- [% INCLUDE 'maps/noscript_map.html' js = 1 %]
+ [% DEFAULT noscript_map_template = 'maps/noscript_map.html' %]
+ [% INCLUDE $noscript_map_template js = 1 %]
</div>
[% IF map.copyright %]
<div class="olControlAttribution" style="position: absolute;">[% map.copyright %]</div>
diff --git a/templates/web/base/maps/wmts.html b/templates/web/base/maps/wmts.html
new file mode 100644
index 000000000..d955f6985
--- /dev/null
+++ b/templates/web/base/maps/wmts.html
@@ -0,0 +1,4 @@
+[% map_html = BLOCK %]
+[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_wmts.html' %]
+[% INCLUDE maps/wmts_config.html %]
+[% END %]