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:

  1. Hardware acceleration was disabled in the browser. MapBox GL requires GPU rendering; without it, the map silently fails.
  2. Coordinates were reversed — longitude and latitude were being passed in the wrong order. MapBox GL uses [longitude, latitude]; the code was sending [latitude, longitude].
  3. Coordinates were integers, not floats — the API was treating them as integers, losing the decimal precision needed for any useful geolocation.
  4. The map container had zero height — no CSS was set for it, so it rendered as a 0×0 box.
  5. 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.
Once all five were addressed, the map loaded correctly.

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.