another try, this time on JS side

This commit is contained in:
fkloft
2015-11-07 22:58:01 +01:00
parent 584780ec05
commit d166d88263

View File

@ -519,7 +519,11 @@ window.setupLayerChooserApi = function() {
var baseLayersJSON = JSON.stringify(baseLayers);
if (typeof android !== 'undefined' && android && android.setLayers) {
android.setLayers(baseLayersJSON, overlayLayersJSON);
if(this.androidTimer) clearTimeout(this.androidTimer);
this.androidTimer = setTimeout(function() {
this.androidTimer = null;
android.setLayers(baseLayersJSON, overlayLayersJSON);
}, 1000);
}
return {