私も答えに興味があります。
一方、ちょうどol3では、負荷機能(私は約束を使用するのが好きですが、以下のものを使わずに書き換えが簡単です)でタイルを手動で処理し、タイムアウトを設定して処理を進めます。以下のコードは、タイムアウトの目的のために少しオーバーしていますが、地図上に表示される前にタイルを操作したい場合に便利です。
tileLoadFunction: offline.get_tile_function(layername),
function get_tile_function(layername) {
return function my_tileLoadFunction(it, s) {
var ie = new Image();
var clock;
var p = new Promise (function (win, fail) {
ie = it.getImage();
clock = setTimeout(function() {
return fail(Error('skipping tile, source for '+layername+' +
+took too long to provide img data'));
}, 3000);
getRemote();
//all one has to do is win(s) the source (s)
//but instead, get the image and do something with it...
function getRemote() {
//... like calling a canvas context pixel manipulation subroutine
pixelManipulate(s).then(function(newpixeldata) {
return win({image or image data})
}, function (err) {
return fail(Error('problem playing w/pixels'))
})
}
})
p.then(function(data) {
if (clock) clearTimeout(clock)
ie.src = data;
ie = null;
}, function(error) {
if (error) console.log(error)
ie.src = '';
ie = null;
});
}
})