oneworld.WebMap.add_overlay

WebMap.add_overlay(name, show_start=True, show_panel=True, alwaysontop=False)

Add an overlay layer.

Add a layer to the map object that contains an overlay. Overlays are transparent by default unless they are populated with other elements (such as panels, markers, …) so its only purpose is to serve as a container for other element of the map. Overlays stack on top of the active basemap and on top of each other, unless deactivated in the layer control panel (more than one overlay layer can be active at a time).

Parameters:
  • name (str) – Name of the overlay layer. It is also the string that will be displayed in a layer control panel in case it is added.

  • show_start (bool) – If True, the overlay will be active on map load (Default: True)

  • show_panel (bool) – If False, its name will never appear in any control layer panel. This means that it will not be possible to activate it or deactivate it, it will stay as show_start defined (Default: True).

  • alwaysontop (bool) – If True, the overlay will always be the top layer, even when changing active layers through a layer control (useful for example when mixing markers and choropleths) (Default: False).

Warning

If a dataframe is used in any of the other methods, the name of the overlay cannot coincide with the name of any of the columns of the dataframe.