Skip to content

Latest commit

 

History

History
25 lines (17 loc) · 564 Bytes

README.md

File metadata and controls

25 lines (17 loc) · 564 Bytes

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"]))