You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We call this code snipppet from async function.
The problem is the following. "When I called" console.log is the first thing, which was written to console output instead of progress status.
We don't understand why don't wait "await" keyword the createPack async function return.
Thank you for your help.
The text was updated successfully, but these errors were encountered:
The task of creating pack is done. But it does not mean the pack is downloaded. I think this is intentional behaviour as the user might anyway leave the app while the pack is downloading. So it is not a reliable to wait for if anyway.
Hello,
We found a strange thing (maybe a bug?), when we tried to use MapLibreGL.offlineManager.createPack function.
Example code snippet:
await MapLibreGL.offlineManager.createPack({
name: 'offline',
styleURL: OFFLINE_MAP,
bounds: offlineBBox,
minZoom: 5,
maxZoom: 22
}, (pack, progressStatus) => {
console.log(progressStatus.percentage);
}, (err) => {
console.log("Error happened");
});
console.log("When I called");
We call this code snipppet from async function.
The problem is the following. "When I called" console.log is the first thing, which was written to console output instead of progress status.
We don't understand why don't wait "await" keyword the createPack async function return.
Thank you for your help.
The text was updated successfully, but these errors were encountered: