diff options
author | Struan Donald <struan@exo.org.uk> | 2019-12-09 17:13:10 +0000 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2020-02-17 14:10:08 +0000 |
commit | 1b8f50e5a3ea0a08c88cc5676467743ab03741b2 (patch) | |
tree | ce76350e8510c13dbe68e0809158fd072ab9d423 /templates | |
parent | 998886ee5d70151871f57147914529a5f463f37c (diff) |
base files for displaying WMS maps
Basic config and setup files for using WMS based map tiles. These still
require config in appropriate cobrand perl and javascript files
Diffstat (limited to 'templates')
-rw-r--r-- | templates/web/base/maps/noscript_map_base_wmx.html (renamed from templates/web/base/maps/noscript_map_wmts.html) | 0 | ||||
-rw-r--r-- | templates/web/base/maps/openlayers.html | 4 | ||||
-rw-r--r-- | templates/web/base/maps/wms.html | 4 | ||||
-rw-r--r-- | templates/web/base/maps/wms_config.html | 13 | ||||
-rw-r--r-- | templates/web/base/maps/wmts.html | 2 |
5 files changed, 20 insertions, 3 deletions
diff --git a/templates/web/base/maps/noscript_map_wmts.html b/templates/web/base/maps/noscript_map_base_wmx.html index 45de9926e..45de9926e 100644 --- a/templates/web/base/maps/noscript_map_wmts.html +++ b/templates/web/base/maps/noscript_map_base_wmx.html diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html index 5002d4243..48a2f0890 100644 --- a/templates/web/base/maps/openlayers.html +++ b/templates/web/base/maps/openlayers.html @@ -33,8 +33,8 @@ <div id="map_box" aria-hidden="true"> [% pre_map %] <div id="map"> - [% IF noscript_map_template == 'maps/noscript_map_wmts.html' %] - [% INCLUDE 'maps/noscript_map_wmts.html' js = 1 %] + [% IF noscript_map_template == 'maps/noscript_map_base_wmx.html' %] + [% INCLUDE 'maps/noscript_map_base_wmx.html' js = 1 %] [% ELSE %] [% INCLUDE 'maps/noscript_map.html' js = 1 %] [% END %] diff --git a/templates/web/base/maps/wms.html b/templates/web/base/maps/wms.html new file mode 100644 index 000000000..93fcb95dd --- /dev/null +++ b/templates/web/base/maps/wms.html @@ -0,0 +1,4 @@ +[% map_html = BLOCK %] +[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_base_wmx.html' %] +[% INCLUDE maps/wms_config.html %] +[% END %] diff --git a/templates/web/base/maps/wms_config.html b/templates/web/base/maps/wms_config.html new file mode 100644 index 000000000..f7fe3510c --- /dev/null +++ b/templates/web/base/maps/wms_config.html @@ -0,0 +1,13 @@ +<script nonce="[% csp_nonce %]"> + var fixmystreet = window.fixmystreet || {}; + fixmystreet.wms_config = { + 'map_projection': '[% map.map_projection %]', + 'tile_urls': [% map.tile_urls | safe %], + 'tile_size': [% map.tile_size %], + 'layer_names': [% map.layer_names | safe %], + 'wms_version': '[% map.wms_version %]', + 'format': '[% map.format %]', + 'scales': [% map.scales | safe %], + 'requestEncoding': "REST" + }; +</script> diff --git a/templates/web/base/maps/wmts.html b/templates/web/base/maps/wmts.html index d955f6985..25c9065a3 100644 --- a/templates/web/base/maps/wmts.html +++ b/templates/web/base/maps/wmts.html @@ -1,4 +1,4 @@ [% map_html = BLOCK %] -[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_wmts.html' %] +[% INCLUDE maps/openlayers.html noscript_map_template = 'maps/noscript_map_base_wmx.html' %] [% INCLUDE maps/wmts_config.html %] [% END %] |