/streamlit-current-location

Streamlit component to tell the current coordinaate

Primary LanguagePythonMIT LicenseMIT

streamlit-current-location

Streamlit component to tell the current coordinaate

Installation instructions

pip install streamlit-current-location

Usage instructions

import streamlit as st

from streamlit_current_location import current_position

# it returns dict of GeolocationCoordinates
# see https://developer.mozilla.org/ja/docs/Web/API/GeolocationCoordinates
position = current_position()

if position is not None:
  st.write("latitude: " + str(position["latitude"]))
  st.write("longitude: " + str(position["longitude"]))