A scrollable 3D Earth demo using Three.js and Google's Photorealistic 3D Tiles.
- Python 3 (for the local server)
- A Google Map Tiles API Key
-
Get an API Key:
- Go to the Google Cloud Console.
- Enable the Map Tiles API.
- Create an API Key.
-
Configure the App:
- Open
config.jsin a text editor. - Paste your API Key into the
GOOGLE_API_KEYfield.
export const CONFIG = { GOOGLE_API_KEY: 'YOUR_KEY_HERE', // OR for Cesium Ion: // CESIUM_ION_TOKEN: 'YOUR_ION_TOKEN', ... };
Note: You can use either a direct Google API Key OR a Cesium Ion Token. If both are present, Cesium Ion takes precedence.
- Open
- Open a terminal in this directory.
- Run the Python simple HTTP server:
python3 -m http.server 8000
- Open your browser to http://localhost:8000.
- Left Click + Drag: Rotate the globe.
- Scroll Wheel: Zoom in/out.
- Right Click + Drag: Pan (limited).
- Black Screen? Check the console (F12) for errors.
- 401/403 Error? Your API Key might be invalid or the Map Tiles API is not enabled.
- CORS Errors? Ensure you are running via
http://localhost:8000and not opening the file directly.