OfflineMaps
OfflineMaps copied to clipboard
Windows Phones + base64
Just wanted to share this if someone else is struggling with the issue :smile:
Seems like the Internet Explorer on Windows Phones doesn't like raw binary images, so I fixed this by converting the uint8array to base64 string in the getTileUrl function like this:
function (tx, res) {
var u8 = new Uint8Array(res.rows.item(0).tile_data);
var b64encoded = btoa(String.fromCharCode.apply(null, u8));
tile.src = base64Prefix + b64encoded;
}