Layer Opacity
A unique feature to Xweather Raster Maps is the ability to control the opacity of an individual layer. Opacity values range from 0 to 100, where 0 is completely transparent and 100 is opaque. Each layer will have a default opacity of 100 (fully opaque) if not provided in the URL.
Single Layer Opacity
To add this to a layer, simply add :{amount}
immediately after the layer within the URL, where {opacity}
is the opacity percentage value you want to use. For example: radar:70
would add the radar with 70% opacity.
Opacity: 100%
https://maps.api.xweather.com/{client_id}_{client_secret}/flat,radar,cities/700x300/seattle,wa,6/current.png
Opacity: 75%
https://maps.api.xweather.com/{client_id}_{client_secret}/flat,radar:75,cities/700x300/seattle,wa,6/current.png
Opacity: 50%
https://maps.api.xweather.com/{client_id}_{client_secret}/flat,radar:50,cities/700x300/seattle,wa,6/current.png
Opacity: 25%
https://maps.api.xweather.com/{client_id}_{client_secret}/flat,radar:25,cities/700x300/seattle,wa,6/current.png
Multiple Layer Opacity
When making requests with multiple layers, opacity can be set for each layer individually and each layer can have a different opacity level. For example, a static map that displays advisories with 80% opacity to allow the terrain to show through and radar layered on top with 75% opacity:
https://maps.api.xweather.com/{client_id}_{client_secret}/terrain,alerts:80,radar:75,cities/700x300/seattle,wa,6/current.png