hh_mypypkg module¶
Main module.
Map (Map)
¶
Source code in hh_mypypkg/hh_mypypkg.py
class Map(ipyleaflet.Map):
def __init__(self, **kwargs):
super().__init__(**kwargs)
self.add_control(ipyleaflet.LayersControl())
def add_raster(self, raster_path):
"""Add a raster to the map."""
raster = ipyleaflet.TileLayer(
url=raster_path,
name=raster_path,
attribution="",
)
self.add_layer(raster)
add_raster(self, raster_path)
¶
Add a raster to the map.
Source code in hh_mypypkg/hh_mypypkg.py
def add_raster(self, raster_path):
"""Add a raster to the map."""
raster = ipyleaflet.TileLayer(
url=raster_path,
name=raster_path,
attribution="",
)
self.add_layer(raster)