Hi all;
I’m developing a code to plot some locations and, first of all, I need to locate the user. I am using this code, which works very well:
loc_button = Button(label=“Mi ubicación”)
loc_button.js_on_event(“button_click”, CustomJS(code=“”"
navigator.geolocation.getCurrentPosition(
(loc) => {
document.dispatchEvent(new CustomEvent(“GET_LOCATION”, {detail: {lat: loc.coords.latitude, lon: loc.coords.longitude}}))
}
)
“”"))
result = streamlit_bokeh_events(
loc_button,
events=“GET_LOCATION”,
key=“get_location”,
refresh_on_update=False,
override_height=75,
debounce_time=0)
if result:
if “GET_LOCATION” in result:
st.write(f"Tu ubicación es: {result.get(‘GET_LOCATION’)}")
ubi = result.get(“GET_LOCATION”)
The proble is that the button shape looks very messy and I’m not founding the way to change it. Can you help me?