SocioWire frontend (working JS source, swchrist/sw-fe) — self-hosted mirror w/ v2 globe+clusters
Go to file
Your Name 2c3722146a Fix map center drift by using geographic center instead of bounds center
Problem: Map position drifted north/higher on each reload because
bounds.getCenter() returns a visually offset center when pitch is applied

Solution:
- Use map.getCenter() for accurate geographic center (not affected by pitch)
- Save and restore bearing (rotation) along with pitch
- Store: lat, lon, zoom, pitch, bearing

Before: bounds.getCenter() → visual center (offset by 3D tilt)
After: map.getCenter() → true geographic center

This ensures the map returns to the exact same position after reload,
regardless of the 3D tilt angle.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2025-12-22 23:05:44 -05:00
public update frontend 2025-12-21 23:37:00 -05:00
src Fix map center drift by using geographic center instead of bounds center 2025-12-22 23:05:44 -05:00
utils update frontend 2025-12-21 00:28:26 -05:00
.gitignore yeah 2025-12-08 23:22:58 +00:00
README.md carche 2025-12-22 02:30:42 -05:00
deploy.sh blehh 2025-12-18 22:39:29 -05:00
eslint.config.js yeah 2025-12-08 23:22:58 +00:00
index.html update frontend 2025-12-21 22:54:50 -05:00
logo-master.png update frontend 2025-12-21 20:16:34 -05:00
package-lock.json bleh 2025-12-19 16:24:21 -05:00
package.json j essais de fix 2025-12-16 22:47:17 -05:00
vite.config.js j essais de fix 2025-12-16 22:47:17 -05:00

README.md

React + Vite

char ok tourbmarxhe y

This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.

Currently, two official plugins are available:

React Compiler

The React Compiler is not enabled on this template because of its impact on dev & build performances. To add it, see this documentation.

Expanding the ESLint configuration

If you are developing a production application, we recommend using TypeScript with type-aware lint rules enabled. Check out the TS template for information on how to integrate TypeScript and typescript-eslint in your project.