File size: 773 Bytes
ce297b5
1777025
01584bd
 
1777025
 
 
 
 
ffa1602
1777025
01584bd
 
 
 
1777025
01584bd
 
 
 
 
 
 
 
 
1777025
01584bd
 
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
import os
import streamlit as st
import folium
from streamlit_folium import folium_static

# Set the page configuration
st.set_page_config(page_title="Google Maps 3D", layout="wide")

# Set your Google Maps API key
api_key = os.getenv("GM_TOKEN")

# Create a Folium map instance
map_center = [37.7749, -122.4194]  # Example coordinates for San Francisco
map_zoom = 12
m = folium.Map(location=map_center, zoom_start=map_zoom)

# Add the Google Maps 3D tile layer
google_3d_layer = folium.TileLayer(
    tiles=f"https://tile.googleapis.com/v1/3dtiles/root.json?key={api_key}",
    attr="Google",
    name="Google Maps 3D",
    overlay=True,
    control=True,
)
google_3d_layer.add_to(m)

# Display the Folium map using streamlit-folium
folium_static(m, width=800, height=600)