From a9d29ba2380023594ae41be20f8da0614ed02738 Mon Sep 17 00:00:00 2001 From: Stefan Breunig Date: Fri, 8 Feb 2013 12:41:54 +0100 Subject: [PATCH] enable zoom control buttons by default (Fixes #33). MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If you want maximum screen estate you can disable them until you clear your cache: Firefox: CTRL+SHIFT+K Opera/Chrome: CTRL+SHIFT+I, select console Then enter the following and hit enter: localStorage['iitc.zoom.buttons'] = 'false' You can enable them by exchanging “false” with anything else or by clearing your cache. You can close the web developer console by hitting the shortcut again or clicking the x-button somewhere. --- code/boot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/code/boot.js b/code/boot.js index 56ca71a2..ffa9268c 100644 --- a/code/boot.js +++ b/code/boot.js @@ -57,7 +57,9 @@ window.setupMap = function() { portalsLayer = L.layerGroup([]); linksLayer = L.layerGroup([]); fieldsLayer = L.layerGroup([]); - window.map = new L.Map('map', $.extend(getPosition(), {zoomControl: false})); + window.map = new L.Map('map', $.extend(getPosition(), + {zoomControl: !(localStorage['iitc.zoom.buttons'] === 'false')} + )); try { map.addLayer(views[readCookie('ingress.intelmap.type')]); } catch(e) { map.addLayer(views[0]); }