To force a download by setting the href, we need synchronous rendering

This commit is contained in:
Tim Schaub
2014-07-11 21:49:57 -06:00
parent 8c1ad54bd8
commit a6f921d443

View File

@@ -31,7 +31,7 @@ if ('download' in exportPNGElement) {
var canvas = event.context.canvas;
exportPNGElement.href = canvas.toDataURL('image/png');
});
map.render();
map.renderSync();
}, false);
} else {
var info = document.getElementById('no-download');