Skip to content

Commit

Permalink
Add progress bar
Browse files Browse the repository at this point in the history
  • Loading branch information
Stefan Kuethe committed Jan 20, 2024
1 parent c7058ea commit 09a180f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/examples/road_safety/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,13 @@ def mapylibre():

@reactive.Effect
@reactive.event(input.res, ignore_init=True)
async def resolutiom():
async def resolution():
async with MapContext("mapylibre", session=session) as m:
m.set_data("road-safety", create_h3_grid(input.res()))
with ui.Progress() as p:
p.set(message="H3 calculation in progress")
geojson = create_h3_grid(input.res())
m.set_data("road-safety", geojson)
p.set(1, message="Calculation finished")


app = App(app_ui, server)
Expand Down

0 comments on commit 09a180f

Please sign in to comment.