xoa.core.plot.add_layer#
- xoa.core.plot.add_layer(ax, name=None, alpha=None, zorder=None, attribution=None, fallback=True, **kwargs)[source]#
Add a background layer from a web map service to a cartopy axes
The layers are defined in the
layerssection of the xoa config, like in the following example:[layers] [[mylayer]] kind = wms url = https://my.server/wms? layer = my_layer_name attribution = My credits- Parameters:
ax (cartopy.mpl.geoaxes.GeoAxes)
name (None, str) – Layer name, which defaults to the
plot.layeroptionalpha (None, float) – Opacity, which defaults to the
plot.layer_alphaoptionzorder (None, float) – Drawing order, which defaults to the
plot.layer_zorderoptionattribution (None, bool) – Draw the attribution of the layer, if any, which defaults to the
plot.layer_attributionoptionfallback (bool) – Add the land with
add_land()and warn when the service fails instead of raising the errorkwargs – Extra parameters are passed to
cartopy.mpl.geoaxes.GeoAxes.add_wms()orcartopy.mpl.geoaxes.GeoAxes.add_wmts()
- Returns:
matplotlib.artist.Artist
See also