I'm struggling to get a WMS feed to work, the feed is explained here:
https://software.ecmwf.int/wiki/display/MACSUP/Accessing+public+CAMS+WMS+products
An example URL to retrieve a layer is:
However, I'm not sure how to get the Open Layers 3 WMS API to read this layer in, i'm currently doing:
var layer_to_return = new ol.layer.Tile({
preload: Infinity,
visible: true,
source: new ol.source.TileWMS(({
url: 'https://apps.ecmwf.int/wms/',
params: {'LAYERS': 'composition_aod550', 'token':'public'},
serverType: 'geoserver',
crossOrigin: 'anonymous'
}))
});
map.addLayer(layer_to_return);
Which seems to include most of the URL, except for the 'grid' element and the bounding box. I'm not sure why it won't get rendered in OL3.