From db12b07540dabfaf5c3f51d8c0cb0b0ed9309ac2 Mon Sep 17 00:00:00 2001 From: Jon Atkins Date: Fri, 23 Oct 2015 22:50:12 +0100 Subject: [PATCH] fix #1068 - blank layer chooser on mobile --- code/boot.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/code/boot.js b/code/boot.js index d37cdb3b..95ad2e3a 100644 --- a/code/boot.js +++ b/code/boot.js @@ -575,6 +575,14 @@ window.setupLayerChooserApi = function() { // call through return _update.apply(this, arguments); } + // as this setupLayerChooserApi function is called after the layer menu is populated, we need to also get they layers once + // so they're passed through to the android app + try { + if(typeof android != 'undefined') + window.layerChooser.getLayers(); + } catch(e) { + console.error(e); + } } // BOOTING ///////////////////////////////////////////////////////////