aboutsummaryrefslogtreecommitdiffstats
path: root/web/js/map-bing-ol.js
diff options
context:
space:
mode:
authorJosh Angell <josh@supercooldesign.co.uk>2012-02-29 09:51:31 +0000
committerJosh Angell <josh@supercooldesign.co.uk>2012-02-29 09:51:31 +0000
commitb25fecb70f59e81fb72a4b884d9ebb9dbf52dc9d (patch)
treed2eb5b3e4abc3b29f93b3d417cbb1a3e469c3ef7 /web/js/map-bing-ol.js
parent355603aa8523ea76eff82ce58e962311a186a939 (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.js5
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()
];
}