Imagine a website that loads a live, glowing Earthโฆ then immediately points to where you are in the world โ in real time.
Thatโs exactly what I built last weekend using JavaScript, Globe.gl, and a bit of UI magic.
๐ Live Project & GitHub
- ๐ Live Demo: https://realtime-geo.netlify.app
๐ The Goal
I wanted to build a lightweight, modern, and interactive 3D Earth that:
- Rotates in real time
- Shows your live location
- Looks clean and stylish (glassmorphism FTW ๐)
- Can be used as a portfolio feature, landing page, or just a cool visualization
๐ ๏ธ Stack & Tools
| Tool | Purpose |
|---|---|
Globe.gl |
3D Earth visualization (built on top of Three.js) |
HTML/CSS |
UI + layout |
JavaScript |
Logic + geolocation |
Netlify |
Deployment |
๐งฑ Step-by-Step Breakdown
1. Set Up the Globe ๐
I started with Globe.gl, which makes it super simple to render a fully interactive 3D globe with bump mapping and atmosphere.
const world = Globe()(document.getElementById('container'))
.globeImageUrl('earth-dark.jpg')
.bumpImageUrl('earth-topology.png')
.showAtmosphere(true)
.atmosphereColor('#3a228a')
.backgroundColor('#000');
One line of setup = fully functional Earth.
2. Add Geolocation ๐
Next, I used the browser's native navigator.geolocation API to fetch the userโs live latitude and longitude.
navigator.geolocation.getCurrentPosition(position => {
const { latitude, longitude } = position.coords;
addMarker(latitude, longitude);
});
If permissions were denied, I defaulted to New Delhi.
Then, I mapped those coordinates to the globe and added a red point marker using Globe.gl's .pointsData() method.
3. Add a Modern UI with Glassmorphism ๐ง
I styled the navbar and footer using backdrop-filter and translucent RGBA backgrounds to create a glassmorphism effect.
nav {
backdrop-filter: blur(10px);
background: rgba(255, 255, 255, 0.05);
}
The result? Clean, modern, and layered UI โ and no external UI libraries needed!
4. Sign It Like a Developer-Artist โ๏ธ
To make the project feel more personal, I added a floating signature in cursive font at the bottom right.
<div class=\"signature\">Er Raj Aryan</div>
.signature {
font-family: 'Great Vibes', cursive;
font-size: 2rem;
color: rgba(255, 255, 255, 0.15);
transform: rotate(-10deg);
}
Itโs subtle. But trust me โ it leaves a lasting impression.
โจ Final Result
- โ Real-time location detection
- โ 3D rotating Earth
- โ Atmosphere & lighting
- โ Glassmorphism UI
- โ Floating signature watermark
๐ฆ What You Can Build With It
This isnโt just eye candy. This project can be the foundation for other ideas like:
- Live website visitor tracking (with server-side data)
- Geolocation-based portfolio
- Day/night zone simulation
- 3D story-driven landing page
๐ What I Learned
- High-level libraries like Globe.gl save time and headaches
- CSS details matter (glassmorphism was a win here)
- You donโt need React or Vue for every project
- Finishing touches (like a signature) make your work memorable
๐ Try It Yourself
๐ฏ Live Demo: https://realtime-geo.netlify.app
๐ GitHub: https://github.com/er-raj-aryan/realtime-geo
๐ง Got Feedback?
Iโd love to hear your thoughts โ or see your remixed version of this. Fork it, tweak it, and tag me if you do something cool!
And if you liked this breakdown, consider following me here for more front-end experiments like this. ๐

Top comments (0)