Skip to content

Commit f082d12

Browse files
committed
uncomment
1 parent 22ceeeb commit f082d12

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

examples/shiny/app.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1-
from shiny.express import ui
1+
import geopandas as gpd
2+
from shiny import reactive
3+
from shiny.express import input, ui
24
from shinywidgets import render_widget
35

4-
from lonboard import Map
6+
from lonboard import Map, ScatterplotLayer
57

68
colors = {
79
"Red": [200, 0, 0],
@@ -12,17 +14,17 @@
1214
ui.input_select("color_select", "Color", choices=list(colors.keys()))
1315

1416

15-
# @render_widget
16-
# def layer():
17-
# gdf = gpd.read_file(gpd.datasets.get_path("naturalearth_cities"))
18-
# return ScatterplotLayer.from_geopandas(gdf, radius_min_pixels=2)
17+
@render_widget
18+
def layer():
19+
gdf = gpd.read_file(gpd.datasets.get_path("naturalearth_cities"))
20+
return ScatterplotLayer.from_geopandas(gdf, radius_min_pixels=2)
1921

2022

2123
@render_widget
2224
def map():
2325
return Map([])
2426

2527

26-
# @reactive.effect
27-
# def set_fill_color():
28-
# layer.widget.get_fill_color = colors[input.color_select()]
28+
@reactive.effect
29+
def set_fill_color():
30+
layer.widget.get_fill_color = colors[input.color_select()]

0 commit comments

Comments
 (0)