oneworld.WebMap

class oneworld.WebMap(scale=True, title='OneWorld', **kwargs)

Base interactive map object.

Parameters:
  • scale (bool) – Show a scale (Default: ‘True’).

  • title (str) – String to be displayed on the navigation bar (Default: ‘OneWorld’).

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

Variables:
  • options (dict) – Attribute containing the optional kwargs of the Map object.

  • scale (bool) – Whether to include a scale on the map or not.

  • title (str) – Title of the map.

  • layercontrol (object or None) – If added to the map this will store the Layercontrol object.

  • circles (list or None) – List of all the Circle objects added to the map.

  • lines (list or None) – List of all the Line objects added to the map.

  • styles (dict of dicts) – Dictionary with names of styles as keys and style dictionaries as values.

  • basemaps (list) – List of Basemap objects added to the map.

  • overlays (list) – List of Overlay objects added to the map.

  • panel (object or None) – Container for the Panel object, if added to the map.

  • box (object or None) – Container for the Box object, if added to the map.

  • graph (bool or None) – Will be set to True when a network is added to the map.

  • layers (list) – Created when calling the savemap method, this will contain the names of all basemaps and overlays in the map.

  • logo (object or None) – Container for the Logo object when added to the map.

  • geojson (list) – List of Geojson objects added to the map.

  • colorbar (list) – List of Colorbar objects added to the map.

  • heatmap (object or None) – Container for the Heatmap object, if added to the map.

__init__(scale=True, title='OneWorld', **kwargs)

Contructor method. Create the world. Well, the map of the world

Methods

__init__([scale, title])

Contructor method.

add_basemap([name, tiles, source])

Add a basemap.

add_box([contents, position])

Add a box that with static content.

add_choropleth(json_file, geoid, color[, ...])

Add a choropleth.

add_circles(latitude, longitude[, size, ...])

Add circles in specific locations.

add_geojson(json_file[, subset, subset_key, ...])

Add a GeoJSON file to the map.

add_heatmap(latitude, longitude, intensity)

Add a heatmap to the map.

add_layer_control([position, collapsed, ...])

Add a layer control panel.

add_lines(latitude0, longitude0, latitude1, ...)

Add lines connecting specific locations.

add_logo(source[, position, width, embed])

Add a static image from a file.

add_network(latitude, longitude[, source, ...])

Add nodes connected by edges.

add_overlay(name[, show_start, show_panel, ...])

Add an overlay layer.

add_panel([title, lines, noinfo, position, ...])

Add an information panel.

savemap([outfile])

Create the file containing the map.