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)