fetch_layers

Maps.fetch_layers(layers=None, verbose=True)

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.

  • verbose (bool) – Indicator if status-messages should be printed or not. The default is True.

See also

m.cb.keypress.attach.fetch_layers

use a keypress callback to fetch layers