Skip to content

Commit 889fcba

Browse files
committed
Try to update shiny example
1 parent d1230ae commit 889fcba

File tree

3 files changed

+1979
-0
lines changed

3 files changed

+1979
-0
lines changed

examples/shiny/app.py

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
from shiny.express import ui
2+
from shinywidgets import render_widget
3+
4+
from lonboard import Map
5+
6+
colors = {
7+
"Red": [200, 0, 0],
8+
"Green": [0, 200, 0],
9+
"Blue": [0, 0, 200],
10+
}
11+
12+
ui.input_select("color_select", "Color", choices=list(colors.keys()))
13+
14+
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)
19+
20+
21+
@render_widget
22+
def map():
23+
return Map([])
24+
25+
26+
# @reactive.effect
27+
# def set_fill_color():
28+
# layer.widget.get_fill_color = colors[input.color_select()]

0 commit comments

Comments
 (0)