oneworld.WebMap.add_basemap

WebMap.add_basemap(name='StreetMap', tiles='OSM', source='', **kwargs)

Add a basemap.

Add a layer to the map object that contains a basemap. A basemap consists of tiles, which are the image that will be displayed on the background of the web navigator (containing administrative borders, physical features, …). No more than one basemap can be active at any given time.

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

  • tiles ({'OSM', 'OSM_BW', 'Stamen_toner', 'Stamen_terrain', 'Stamen_watercolor', 'ESRI_SAT'}) – Tiles to use on the basemap (Default: ‘OSM’).

  • source (str) – String to be displayed at the bottom right corner of the window, prefixed by “Source:” (by default, only tile attributions wiil be displayed).

  • **kwargs – All other keyword arguments as accepted by the tileLayer object in leaflet. (see https://leafletjs.com/reference-1.4.0.html#tilelayer-option)

Warning

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