Examples
Using with ArcGIS

Using with ArcGIS JS

The following provides an example of Xweather Raster Maps radar layer integrated with the ArcGIS Javascript SDK (opens in a new tab) to create a 2D map.

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8"/>
    <title></title>
    <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no"/>
 
    <link rel="stylesheet" href="https://js.arcgis.com/4.17/esri/themes/light/main.css">
    <script src="https://js.arcgis.com/4.17/"></script>
    <style>
        body { margin:0; padding:0; }
        #map { position:absolute; top:0; bottom:0; width:100%; }
    </style>
</head>
<body>
 
<div id='map'></div>
 
<script>
    require([
        "esri/layers/WebTileLayer",
        "esri/Map",
        "esri/views/MapView"
    ], function (WebTileLayer, Map, MapView) {
        const map = new Map({
            basemap: 'streets',
            ground: "world-elevation"
        });
 
        const view = new MapView({
            container: "map",
            map: map,
            zoom: 4,
            center: [-72.47,11.05] // longitude, latitude
        });
 
        const weatherLayer = new WebTileLayer({
            urlTemplate: "http://maps{subDomain}.aerisapi.com/{client_id}_{client_secret}/radar-global/{level}/{col}/{row}/current.png",
            subDomains: ["1", "2", "3", "4"],
            copyright: 'Weather Layers by <a href="https://www.xweather.com/">Xweather.com</a>, '
        });
        map.add(weatherLayer);
    });
</script>
</body>
</html>