fetch_layers

Maps.fetch_layers(layers=None)

Fetch (and cache) the layers of a map.

This is particularly useful if you want to use sliders or buttons to quickly switch between the layers (e.g. once the backgrounds are cached, switching layers will be fast).

Note: After zooming or re-sizing the map, the cache is cleared and you need to call this function again.

Parameters:

layers (list or None, optional) – A list of layer-names that should be fetched. If None, all layers (except the β€œall” layer) are fetched. The default is None.

See also

Maps.cb.keypress.attach.fetch_layers

use a keypress callback to fetch layers