Is there a way to add Title to the Button
ar-siddiqui opened this issue · comments
I got it solved like this. Leaving the code here for anyone that may come here. Sorry, I am very new to folium and JS.
# fit map to all layers bounds
map_bounds = self.m.get_bounds()
# add button to nevigate to map bound
JsButton(
title='<i class="fas fa-crosshairs" title="Map Center"></i>',
function=f"""
function(btn, map) {{
map.fitBounds({map_bounds});
btn.state('reset-zoom');
}}
""",
).add_to(self.m)