Skip to content

openlayers module

Map (AnyWidget)

Map widget

Parameters:

Name Type Description Default
anywidget _type_

description

required
Source code in mapwidget/openlayers.py
class Map(anywidget.AnyWidget):
    """Map widget

    Args:
        anywidget (_type_): _description_
    """

    _cwd = os.path.dirname(os.path.abspath(__file__))
    _esm = pathlib.Path(os.path.join(_cwd, 'javascript', 'openlayers.js'))
    _css = pathlib.Path(os.path.join(_cwd, 'styles', 'openlayers.css'))
    center = traitlets.List([0, 20]).tag(sync=True, o=True)
    zoom = traitlets.Float(2).tag(sync=True, o=True)
    bounds = traitlets.List([0, 0, 0, 0]).tag(sync=True, o=True)
    width = traitlets.Unicode('100%').tag(sync=True, o=True)
    height = traitlets.Unicode('600px').tag(sync=True, o=True)
    clicked_latlng = traitlets.List([None, None]).tag(sync=True, o=True)

Last update: 2023-03-24