# %pip install -U leafmap lonboard import leafmap.deckgl as leafmap import geopandas as gpd import ipywidgets as widgets url = "https://opengeos.org/data/duckdb/nyc_data.zip" leafmap.download_file(url, unzip=True) m = leafmap.Map(center=[20, 0], zoom=1.2) m streets = gpd.read_file("nyc_streets.shp") m.add_gdf(streets, zoom_to_layer=True, pickable=True, get_width=5) m.add_vector("nyc_subway_stations.shp", get_radius=10, get_fill_color=[255, 0, 0, 180]) layer = m.layers[-1] layer.get_fill_color = [0, 0, 255, 255] color = widgets.ColorPicker(value="red", description="Color") width = widgets.IntSlider(min=1, max=100, value=10, description="Radius") hbox = widgets.HBox([color, width]) widgets.dlink((color, "value"), (layer, "get_fill_color")) widgets.dlink((width, "value"), (layer, "get_radius")) hbox m