[iitcm] push layer changes to Android instead of relying on MapSettings to poll them
This commit is contained in:
13
code/boot.js
13
code/boot.js
@ -561,6 +561,19 @@ window.setupLayerChooserApi = function() {
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
var _update = window.layerChooser._update;
|
||||
window.layerChooser._update = function() {
|
||||
// update layer menu in IITCm
|
||||
try {
|
||||
if(typeof android != 'undefined')
|
||||
window.layerChooser.getLayers();
|
||||
} catch(e) {
|
||||
console.error(e);
|
||||
}
|
||||
// call through
|
||||
return _update.apply(this, arguments);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user