Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
default: {
// NOT HANDLED!
throw new Error(
`ERROR: Request kind not handled: ${kind}`
)
}
}
} catch (err) {
console.error('Error while making tile request: %j', err)
callback(err)
}
},
ratio,
}
const map = new mbgl.Map(mapOptions)
map.load(style)
map.render(
{
zoom,
center,
height,
width,
bearing,
pitch,
},
(err, buffer) => {
if (err) {
console.error('Error rendering map')
console.error(err)
return reject(err)