Wanderpin - zoom into the world
Two big things landed this week: the map went from 26 hand-picked places to ~40,000, and zooming into the globe now drops you into a real 3D city.
From 26 places to 40,000 - and they all have a vibe
Wanderpin used to know about 26 famous spots. Now it knows ~40k: cities, towns, UNESCO sites, landmarks, and the world’s most-visited attractions - each tagged with a one-word vibe (Coastal, Alpine, Arid, Heritage, Sacred, Volcanic…).
The fun part is the vibes aren’t hand-typed. They’re derived at build time from real data: a Köppen climate raster (so Cairo reads “Arid” and Athens “Mediterranean”), distance to an actual coastline for “Coastal”, GeoNames elevation/feature codes for peaks and castles, and Wikidata’s annual-visitor numbers to rank “most visited”. Facts come from Wikipedia and UNESCO descriptions. Search is now instant and offline - type “Firenze” and Florence shows up.
The fun part: zoom in and the globe becomes a city
The home view is a space globe (three.js). The close-up is a different engine entirely - maplibre with 3D terrain and buildings. I wired up a level-of-detail handoff between them: zoom into a pin and it crosses from globe to 3D automatically, and zoom back out and it returns to the globe.
The trick to making it not feel janky: when you start zooming in, it quietly mounts the 3D map hidden and lets it pull tiles in the background. Only once the tiles are warm does it crossfade. No blank loading flash.
What broke (twice)
-
It hung forever in preload. The crossfade waited on maplibre’s
idleevent to know tiles were ready - but that event sometimes never fires. The globe just kept zooming into black. Fix: commit after a 2.2s fallback even ifidleis silent. -
The way back never worked. Zooming out in 3D wouldn’t return to the globe. Turned out
map.on("zoom")captured the callback once at mount - back when the view was still “globe” - so itsif (view !== "3d") returnguard killed every event forever. Fix: call the latest callback through a ref.
Both are real bugs that would’ve bitten actual users on slow connections, not just test artifacts.
Where it stands
Globe -> 3D -> globe round-trips cleanly on both laptop and mobile, with zero console errors. Try it: https://wanderpin-ecru.vercel.app/
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.