diff options
author | Josh Angell <josh@supercooldesign.co.uk> | 2012-02-29 09:51:31 +0000 |
---|---|---|
committer | Josh Angell <josh@supercooldesign.co.uk> | 2012-02-29 09:51:31 +0000 |
commit | b25fecb70f59e81fb72a4b884d9ebb9dbf52dc9d (patch) | |
tree | d2eb5b3e4abc3b29f93b3d417cbb1a3e469c3ef7 /web/js/map-bing-ol.js | |
parent | 355603aa8523ea76eff82ce58e962311a186a939 (diff) |
Manipulate permalink only if container for it is there
Signed-off-by: Josh Angell <josh@supercooldesign.co.uk>
Diffstat (limited to 'web/js/map-bing-ol.js')
-rw-r--r-- | web/js/map-bing-ol.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/web/js/map-bing-ol.js b/web/js/map-bing-ol.js index 2786f63cf..3eecf7ce0 100644 --- a/web/js/map-bing-ol.js +++ b/web/js/map-bing-ol.js @@ -1,4 +1,7 @@ function set_map_config(perm) { + if ($('#map_permalink').length) { + permalink_id = 'map_permalink'; + } if ($('html').hasClass('mobile')) { fixmystreet.controls = [ new OpenLayers.Control.Attribution(), @@ -9,7 +12,7 @@ function set_map_config(perm) { new OpenLayers.Control.Attribution(), new OpenLayers.Control.ArgParser(), new OpenLayers.Control.Navigation({ zoomWheelEnabled: false }), - new OpenLayers.Control.Permalink('map_permalink'), + new OpenLayers.Control.Permalink(permalink_id), new OpenLayers.Control.PanZoomFMS() ]; } |