File size: 571 Bytes
16a059c
2d329a0
f8b90ea
030dcfe
f8b90ea
95327ef
 
f8b90ea
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import gradio as gr
from .map_logic import make_map


def get_map_widgets(city_component):
    #map_output = gr.HTML(value="Map will appear here once you type a city", elem_id="map-widget")
    map_output = gr.Plot(label="Map", value=None)
    show_grid = gr.Checkbox(label="Draw Grid", value=False)
    show_georef = gr.Checkbox(label="Show Georeferenced Map", value=False)

    inputs = [city_component, show_grid, show_georef]
    for comp in inputs:
        comp.change(fn=make_map, inputs=inputs, outputs=[map_output])

    return map_output, show_grid, show_georef