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/fms.html12
-rw-r--r--templates/web/base/maps/google-ol.html9
-rw-r--r--templates/web/base/maps/openlayers.html6
-rw-r--r--templates/web/base/maps/osm.html8
4 files changed, 24 insertions, 11 deletions
diff --git a/templates/web/base/maps/fms.html b/templates/web/base/maps/fms.html
index 286ecc8ff..2df3bd11b 100644
--- a/templates/web/base/maps/fms.html
+++ b/templates/web/base/maps/fms.html
@@ -1,3 +1,9 @@
-[%
-map_html = INCLUDE maps/openlayers.html include_key = 1
-%]
+[% map_sub_links = BLOCK %]
+ [% IF c.req.params.aerial %]
+ <a id="map_layer_toggle" href="[% c.uri_with( { aerial => 0 } ) %]">[% loc('Roads') %]</a>
+ [% ELSE %]
+ <a id="map_layer_toggle" href="[% c.uri_with( { aerial => 1 } ) %]">[% loc('Aerial') %]</a>
+ [% END %]
+[% END %]
+
+[% map_html = INCLUDE maps/openlayers.html include_key = 1 %]
diff --git a/templates/web/base/maps/google-ol.html b/templates/web/base/maps/google-ol.html
index 47c940129..9103ba42b 100644
--- a/templates/web/base/maps/google-ol.html
+++ b/templates/web/base/maps/google-ol.html
@@ -2,11 +2,4 @@
<a class="hidden-nojs" id="map_layer_toggle" href="">[% loc('Satellite') %]</a>
[% END %]
-[% map_html = BLOCK %]
-[% INCLUDE maps/openlayers.html %]
-[% UNLESS around_page %]
-<p class="sub-map-links" id="sub_map_links">
- [% map_sub_links | safe %]
-</p>
-[% END %]
-[% END %]
+[% map_html = INCLUDE maps/openlayers.html %]
diff --git a/templates/web/base/maps/openlayers.html b/templates/web/base/maps/openlayers.html
index f4c78767c..60d7acfde 100644
--- a/templates/web/base/maps/openlayers.html
+++ b/templates/web/base/maps/openlayers.html
@@ -46,3 +46,9 @@
<div class="olControlAttribution" style="position: absolute;">[% map.copyright | safe %]</div>
[% END %]
<img id="loading-indicator" class="hidden" aria-hidden="true" src="/i/loading.svg" alt="Loading...">
+
+[% IF NOT around_page AND map_sub_links %]
+<p class="sub-map-links" id="sub_map_links">
+ [% map_sub_links | safe %]
+</p>
+[% END %]
diff --git a/templates/web/base/maps/osm.html b/templates/web/base/maps/osm.html
index 70d05929f..560055f3b 100644
--- a/templates/web/base/maps/osm.html
+++ b/templates/web/base/maps/osm.html
@@ -1,3 +1,11 @@
+[% map_sub_links = BLOCK %][% IF c.config.BING_MAPS_API_KEY %]
+ [% IF c.req.params.aerial %]
+ <a id="map_layer_toggle" href="[% c.uri_with( { aerial => 0 } ) %]">[% loc('Roads') %]</a>
+ [% ELSE %]
+ <a id="map_layer_toggle" href="[% c.uri_with( { aerial => 1 } ) %]">[% loc('Aerial') %]</a>
+ [% END %]
+[% END %][% END %]
+
[%
map.copyright = ''; # This is handled with OpenLayers.Control.Attribution
map_html = INCLUDE maps/openlayers.html