aboutsummaryrefslogtreecommitdiffstats
path: root/web/js
diff options
context:
space:
mode:
authorMatthew Somerville <matthew-github@dracos.co.uk>2016-08-19 12:53:44 +0100
committerMatthew Somerville <matthew-github@dracos.co.uk>2016-08-19 12:55:38 +0100
commit0d5e096bad80e2f5969c79d489edbd3996e15987 (patch)
treeb74edc0d43d5b65256139c7ed503065db013d14d /web/js
parent5ec9b282a03a31d850d038f0384f2695613b74bb (diff)
Fix broken permalink link.
The map JavaScript assumes that the permalink div already exists. [Bristol] Make sure the control is added.
Diffstat (limited to 'web/js')
-rw-r--r--web/js/map-wmts-bristol.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/web/js/map-wmts-bristol.js b/web/js/map-wmts-bristol.js
index 3e5de0c27..58edb0fd1 100644
--- a/web/js/map-wmts-bristol.js
+++ b/web/js/map-wmts-bristol.js
@@ -98,17 +98,15 @@ fixmystreet.maps.matrix_ids = [
* to setup the way the map should operate.
*/
fixmystreet.maps.config = function() {
- // This stuff is copied from js/map-bing-ol.js
-
- var nav_opts = { zoomWheelEnabled: false };
- if (fixmystreet.page == 'around' && $('html').hasClass('mobile')) {
- nav_opts = {};
+ var permalink_id;
+ if ($('#map_permalink').length) {
+ permalink_id = 'map_permalink';
}
- fixmystreet.nav_control = new OpenLayers.Control.Navigation(nav_opts);
fixmystreet.controls = [
new OpenLayers.Control.ArgParser(),
- fixmystreet.nav_control
+ new OpenLayers.Control.Navigation(),
+ new OpenLayers.Control.PermalinkFMS(permalink_id)
];
if ( fixmystreet.page != 'report' || !$('html').hasClass('mobile') ) {
fixmystreet.controls.push( new OpenLayers.Control.PanZoomFMS({id: 'fms_pan_zoom' }) );