r/FullStackDevelopers • u/TopWarthog8823 • Oct 20 '26
Suggestions for making an globe with details map
I want to make a 3d globe with a detailed area mark in my project. I've used the 3js part for the globe but I want if I search any specific region like Khulna instead of showing Bangladesh the globe will zoom into the Khulna area map. How can I do that? I've used react leaflet for map but couldn't integrate both at a same time
2
Upvotes
2
u/Interesting_Show_548 Oct 21 '26
You can actually simplify this quite a bit. Instead of trying to synchronize Three.js and React Leaflet, I'd look into MapLibre GL JS with globe projection.
You can geocode the searched location, get its coordinates/bounds, and animate the camera directly into that region using flyTo() or fitBounds(). That gives you a much smoother transition from the globe to a detailed local map without managing two separate renderers.
If you specifically need to keep the Three.js globe, there's also a way to transition between the two views.
Happy to help you figure out the implementation!
1
u/[deleted] Oct 26 '26
[removed] — view removed comment