Hi,
I just started playing with Parameterized class and I tried several approaches to adapt this code:
class PanelFoliumMap(param.Parameterized):
points_count = param.Integer(20, bounds=(10,100))
def __init__(self, **params):
super().__init__(**params)
self.map = get_map()
self.html_pane = pn.pane.HTML(sizing_mode="stretch_width", min_height=600)
self.view = pn.Column(
self.param.points_count,
self.html_pane,
sizing_mode="stretch_width", min_height=600,
)
self._update_map()
@param.depends("points_count", watch=True)
def _update_map(self):
self.map = get_map()
df_aqi = get_df_aqi(points_count=self.points_count)
add_aqi_circles(self.map, df_aqi)
self.html_pane.object = self.map
app = PanelFoliumMap()
app.view.embed()
from the reference example: Folium — Panel 0.11.3 documentation
My goal is to replace the widget param.Integer(20, bounds=(10,100))
with a IntInput panel widget. Is there an easy solution to do that?
I would like to initialize the widget so it shows a default value of 15 and incremental step of 10
int_input = pn.widgets.IntInput(name='IntInput', value=50, step=10, start=10, end=100)
Thank you!
Loïc