Week 059 — Maps Working
Five things were wrong. Now the map works.
Week of January 5, 2026
Progress
The MapBox map was broken for five independent reasons:
- Hardware acceleration was disabled in the browser. MapBox GL requires GPU rendering; without it, the map silently fails.
- Coordinates were reversed — longitude and latitude were being passed in the wrong order. MapBox GL uses
[longitude, latitude]; the code was sending[latitude, longitude]. - Coordinates were integers, not floats — the API was treating them as integers, losing the decimal precision needed for any useful geolocation.
- The map container had zero height — no CSS was set for it, so it rendered as a 0×0 box.
- A closing
</div>was on the wrong line — a malformed HTML structure that MapBox flagged as a warning and used as reason to refuse to render.
Work continued on hardening the radius: when the user updates the radius value, the circle on the map should update. That turned out to be its own problem — the radius update worked for new items but not for items loaded with an existing lost location.
Decision Made
Lost location null handling: when a user reports an item lost without geolocation data available, the stored coordinates are null, not 0, 0. Zero-zero is a real place (off the coast of Ghana). Null means "we don't know." This was a holdover from earlier code that stored 0 as the default; changed to null for correctness.
Next Week
Radius update bug. Grafana observability.
