---
layout: example
category: example
title: Check for browser support
description: Check for Mapbox GL browser support
tags:
  - browser-support
---
<script src='https://api.mapbox.com/mapbox-gl-js/plugins/mapbox-gl-supported/v{{site.data.plugins.mapbox-gl-supported.latest}}/mapbox-gl-supported.js'></script>
<div id='map'></div>

<script>
if (!mapboxgl.supported()) {
    alert('Your browser does not support Mapbox GL');
} else {
    var map = new mapboxgl.Map({
        container: 'map',
        style: 'mapbox://styles/mapbox/streets-v9',
        center: [-74.50, 40],
        zoom: 9
    });
}
</script>
