File size: 1,360 Bytes
becb943
a238205
7588b34
e9398a5
7588b34
c120a6b
7588b34
e4de63b
 
7588b34
 
 
 
 
 
 
 
 
 
e4de63b
0f061d3
 
 
 
 
f05eb98
0f061d3
 
 
 
 
 
 
 
 
0de23fa
ecf0375
a1a8250
 
c120a6b
 
 
 
 
7683fb2
c120a6b
 
 
b5ae045
ecf0375
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import streamlit as st
import requests
from streamlit_lottie import st_lottie
import pandas as pd

st.title('Mark a point on the map, and I will take you there!')


# Loads animation of the Earth
def load_lottie_url(url: str):
    r = requests.get(url)
    if r.status_code != 200:
        return None
    return r.json()
def ShowAnimation(name, URL):
    anim=load_lottie_url(URL)
    st_lottie(anim, key = name)
ShowAnimation("Badge1","https://assets2.lottiefiles.com/packages/lf20_jte9hafx.json")

#Loads Background Image
def add_bg_from_url():
    st.markdown(
         f"""
         <style>
         .stApp {{
             background-image: url("https://upload.wikimedia.org/wikipedia/commons/0/05/RedPushPin_%28cropped%29.jpg");
             background-attachment: fixed;
             background-size: cover
         }}
         </style>
         """,
         unsafe_allow_html=True
     )
add_bg_from_url() 


city_name = st.text_input('Please input your city')
lat = st.number_input('Please input your latitude:')
long = st.number_input('Please input your longitude')
city_list = []
lat_list = []
long_list = []


if city_name != "" and lat != "" and long != "":
    city_list.append(city_name)
    lat_list.append(lat)
    long_list.append(long)
    st.map(pd.DataFrame({'cities' : city_list, 'lat' : lat_list, 'lon' : long_list}))