A standalone reference implementation showing how PathFound.me uses Google Maps 3D and the Places UI Kit to help teens explore cities where they might live.
Photorealistic 3D fly-throughs, cinematic camera orbits, interactive POI markers, radar-chart fit visualizations — all in vanilla HTML/CSS/JS with zero build tools.
# Any static file server works. Examples:
python3 -m http.server 8000
# or
npx serve .Then open http://localhost:8000 in Chrome (3D Maps requires WebGL2 and a decent GPU).
Note: The app uses a Google Maps Demo Key that is rate-limited and domain-restricted. For production, swap in your own key in
index.html.
- Loading screen animates while the Maps API boots
- US overview — the 3D globe zooms to a dramatic continental view
- City selector sidebar lists 6 curated cities with match scores, blurbs, and animated match bars
- Cinematic fly-to — selecting a city triggers a smooth
flyCameraToanimation at a dramatic tilt angle - City comparison card slides in with population, cost of living, walkability, climate, vibe tags, and top industries
- "Your Fit" radar chart — a pure-SVG spider chart showing how the city matches across 6 dimensions
- POI markers appear on the 3D map (universities, cafes, parks, libraries, music venues, coworking)
- POI category filters toggle marker visibility by type
- City Tour orbit — a 360°
flyCameraAroundcinematic orbit of the city center - Mobile-responsive — sidebar becomes a bottom sheet on screens under 768px
pathfound/
├── index.html — Entry point, loads Google Maps API + app modules
├── css/
│ └── style.css — Dark theme, responsive layout, animations, radar chart
├── js/
│ ├── app.js — Bootstrap, coordinates modules, loading flow
│ ├── cities.js — City data: coords, stats, match scores, fit values, POIs
│ ├── map.js — 3D map init, flyCameraTo, flyCameraAround, POI markers
│ └── ui.js — Sidebar, detail card, radar chart, POI filters, toasts
├── README.md — This file
└── SPEC.md — Original spec
| File | What it does |
|---|---|
cities.js |
Exports a CITIES array with coordinates, camera presets, hardcoded stats, radar-chart fit scores, and POI locations. Also exports PROFILE (simulated user), POI_CATEGORIES, FIT_LABELS, and FIT_KEYS. In production, this data comes from the PathFound assessment engine. |
map.js |
Wraps the gmp-map-3d custom element. Exposes flyToCity() for cinematic camera moves, tourCity() for orbits, renderPOIMarkers() for placing styled markers, and clearMarkers() for cleanup. |
ui.js |
Renders: profile badge, sidebar city list with animated match bars, city detail card (stats, climate, vibes, industries), SVG radar chart with glow effects, POI category filter toggles, POI click toasts, loading/welcome screens, and mobile bottom-sheet behavior. |
app.js |
Glues modules together. Manages the boot sequence: loading screen → Maps API init → UI render → auto-select top city. Provides the handleCityChange hook for future Places API integration. |
- Maps JavaScript API (3D Maps) —
gmp-map-3delement for photorealistic 3D rendering flyCameraTo— smooth animated camera transitions between citiesflyCameraAround— 360° cinematic orbit toursgmp-marker-3d— custom-styled POI markers with emoji icons, extruded above the terrain- Places UI Kit — library loaded and ready for
gmp-place-details-compactintegration
- No build tools — vanilla HTML/CSS/JS with ES modules. Opens in any browser, easy to read and integrate.
- Pure SVG radar chart — no charting library needed. Radial gradient fill + glow filter for visual polish.
- Dark theme (
#0a0f1abg,#00D4FFaccent) — pairs dramatically with the photorealistic 3D map tiles. - Backdrop-blur glass panels — detail overlay uses
backdrop-filter: blur(16px)for a modern frosted-glass look. - Mobile-responsive — sidebar becomes a draggable bottom sheet on screens under 768px.
- Loading screen — covers the ~2s Maps API boot time so the user sees a branded experience, not a blank page.
- POI markers — uses
gmp-marker-3dwith custom template slots for category-colored emoji markers.
- City data — Replace the
CITIESarray incities.jswith an API call to your PathFound backend. Keep the same object shape (the contract is documented in the file). - Match scores & fit values — Currently hardcoded. Wire these to the PathFound assessment engine output.
- User profile — Replace the
PROFILEexport with real assessment results. - API key — Replace the demo key in
index.htmlwith a production key that has Maps JavaScript API, Map Tiles API, and Places API enabled. - POIs — The
handleCityChangecallback inapp.jsis the hook for loading live Places results. Usegmp-place-details-compactandgmp-place-nearby-searchfrom the Places UI Kit. - Real-time data — Climate, cost of living, walkability scores can come from third-party APIs (BLS, Walk Score, OpenWeather).
- Chrome 111+ (or any Chromium browser with WebGL2)
- A GPU that supports photorealistic 3D tiles
- Internet connection (maps tiles stream from Google)
Internal reference implementation for PathFound.me.