Layer Usage

Layer Usage

The Xweather Raster Maps provides access to a large variety of base map styles, weather and admin/boundary overlays. The exact options available to you will depend on your specific Xweather Raster Maps subscription. Review the list of layers for a complete list of layers currently available.

Single Layer

When requesting a map tile, the url may be similar too:

https://maps.api.xweather.com/{client_id}_{client_secret}/{type}/{z}/{x}/{y}/{offset}.png

Where {type} is the map layer type required. For example a radar tile request:

https://maps.api.xweather.com/{client_id}_{client_secret}/radar/1/0/0/current.png

Combining Layers

Xweather Raster Maps also allows you to combine multiple layers into a single image. With map tile requests this can be useful to lower the total number of images being fetched, especially within mobile applications. To combine multiple layers, simply comma separate their type codes.

For example, to overlay radar on top of alerts, the layer type would be alerts,radar:

https://maps.api.xweather.com/{client_id}_{client_secret}/alerts,radar/1/0/0/current.png

Combining layers works with static map requests as well. For example, the following is a url for a map with a base, alerts, radar and a general admin overlay with borders and cities:

https://maps.api.xweather.com/{client_id}_{client_secret}/flat-dk,alerts,radar,admin/500x500/minneapolis,mn,6/current.jpg

Layer Combination Limits

While the ability to combine layers is powerful, there is currently a maximum limit of ten (10) layers that may be combined in a single request. This is normally more than sufficient for most needs. Your Xweather Raster Maps subscription may provide alternate limits on the maximum number of layers that may be combined.