maybe fix #295
This commit is contained in:
parent
f213a481e8
commit
9782883b5c
12
code/boot.js
12
code/boot.js
@ -58,10 +58,6 @@ window.setupMap = function() {
|
|||||||
{zoomControl: !(localStorage['iitc.zoom.buttons'] === 'false')}
|
{zoomControl: !(localStorage['iitc.zoom.buttons'] === 'false')}
|
||||||
));
|
));
|
||||||
|
|
||||||
try {
|
|
||||||
map.addLayer(views[readCookie('ingress.intelmap.type')]);
|
|
||||||
} catch(e) { map.addLayer(views[0]); }
|
|
||||||
|
|
||||||
var addLayers = {};
|
var addLayers = {};
|
||||||
|
|
||||||
portalsLayers = [];
|
portalsLayers = [];
|
||||||
@ -91,6 +87,14 @@ window.setupMap = function() {
|
|||||||
}, addLayers);
|
}, addLayers);
|
||||||
|
|
||||||
map.addControl(window.layerChooser);
|
map.addControl(window.layerChooser);
|
||||||
|
|
||||||
|
// set the map AFTER adding the layer chooser, or Chrome reorders the
|
||||||
|
// layers. This likely leads to broken layer selection because the
|
||||||
|
// views/cookie order does not match the layer chooser order.
|
||||||
|
try {
|
||||||
|
map.addLayer(views[readCookie('ingress.intelmap.type')]);
|
||||||
|
} catch(e) { map.addLayer(views[0]); }
|
||||||
|
|
||||||
map.attributionControl.setPrefix('');
|
map.attributionControl.setPrefix('');
|
||||||
// listen for changes and store them in cookies
|
// listen for changes and store them in cookies
|
||||||
map.on('moveend', window.storeMapPosition);
|
map.on('moveend', window.storeMapPosition);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user