Using with Mapbox

Using with Mapbox GL

The following provides an example of Xweather Raster Maps radar layer integrated with the Mapbox GL JS SDK (opens in a new tab) library.

<!DOCTYPE html>
    <meta charset="utf-8" />
    <title>Xweather Raster Maps - Mapbox Example</title>
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
        body { margin:0; padding:0; }
        #map { position:absolute; top:0; bottom:0; width:100%; }
    <link href="https://api.tiles.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.css" rel="stylesheet" />
    <script src="https://api.tiles.mapbox.com/mapbox-gl-js/v0.28.0/mapbox-gl.js"></script>
<div id="map"></div>
    mapboxgl.accessToken = 'MAPBOX_TOKEN';
    var tileset = 'mapbox.streets';
    var map = new mapboxgl.Map({
        container: 'map',
        style: 'mapbox://styles/mapbox/streets-v8',
        center: [-95.7, 37.1], // starting position
        zoom: 3 // starting zoom
    map.on('load', function () {
        map.addSource('xweather-radar', {
            "type": 'raster',
            "tiles": [
            "tileSize": 256,
            "attribution": "<a href='https://www.xweather.com/'>Xweather</a>"
            "id": "radar-tiles",
            "type": "raster",
            "source": "xweather-radar",
            "minzoom": 0,