How to use the @mapbox/mapbox-gl-native.Map function in @mapbox/mapbox-gl-native

To help you get started, we’ve selected a few @mapbox/mapbox-gl-native examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github consbio / mbgl-renderer / src / render.js View on Github external
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)

@mapbox/mapbox-gl-native

Renders map tiles with Mapbox GL

BSD-2-Clause
Latest version published 5 years ago

Package Health Score

53 / 100
Full package analysis

Popular @mapbox/mapbox-gl-native functions