Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export function createPack (options) {
const { name, bounds } = options
const progressListener = (offlineRegion, status) => {
// TODO: call redux actions to update ui as needed
console.log(offlineRegion, status)
}
const errorListener = (offlineRegion, err) => {
// TODO: call redux actions to update ui as needed
console.log(offlineRegion, err)
}
return MapboxGL.offlineManager.createPack({
name,
styleURL,
bounds,
// TODO: we'll want to test out different min/max zooms
minZoom: 10,
maxZoom: 20
}, progressListener, errorListener)
}