How to use the @mapbox/mapbox-gl-supported function in @mapbox/mapbox-gl-supported

To help you get started, we’ve selected a few @mapbox/mapbox-gl-supported 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 mapbox / dr-ui / src / components / gl-wrapper / gl-wrapper.js View on Github external
componentDidMount() {
    this.setState({ supported: supported() });
  }
  render() {
github mapbox / mapbox-gl-js / docs / components / example.js View on Github external
render() {
            const {frontMatter} = this.props;
            frontMatter.language = ['JavaScript'];
            frontMatter.contentType = 'example';
            return (
                
                    <div>
                        <div>
                            <div>
                                <h1>{frontMatter.title}</h1>
                                <div>{md(frontMatter.description)}</div>

                                {!supported() &amp;&amp;
                                    <div id="unsupported">
                                        <div>
                                            <div>Mapbox GL unsupported</div>
                                            <div>Mapbox GL requires <a href="http://caniuse.com/webgl">WebGL support</a>. Please check that you are using a supported browser and that WebGL is <a href="http://get.webgl.org/">enabled</a>.</div>
                                        </div>
                                    </div>}
                            </div>

                            {supported() &amp;&amp;
                                </div></div>
github mapbox / mapbox-gl-js / docs / components / example.js View on Github external
<div>
                        <div>
                            <div>
                                <h1>{frontMatter.title}</h1>
                                <div>{md(frontMatter.description)}</div>

                                {!supported() &amp;&amp;
                                    <div id="unsupported">
                                        <div>
                                            <div>Mapbox GL unsupported</div>
                                            <div>Mapbox GL requires <a href="http://caniuse.com/webgl">WebGL support</a>. Please check that you are using a supported browser and that WebGL is <a href="http://get.webgl.org/">enabled</a>.</div>
                                        </div>
                                    </div>}
                            </div>

                            {supported() &amp;&amp;
                                </div></div>

@mapbox/mapbox-gl-supported

A library to determine if a browser supports Mapbox GL JS

BSD-3-Clause
Latest version published 9 months ago

Package Health Score

80 / 100
Full package analysis

Similar packages