Problem
There is no way to link someone to a specific place. Opening /map always lands on the default view, so if you find your exam centre you cannot send it to anyone. Reloading the page also loses whatever you had selected.
Where to start
src/app/map/ - the map page and its client component
- Place records already carry a stable
id, so no data changes are needed
What to build
Read and write four URL params: place, lat, lng, zoom.
On load, if place is present, select that place and open its card. If the coordinates are present, restore that viewport. If place does not match any known id, fall back to the default view rather than erroring.
While the user pans or zooms, update the URL with history.replaceState rather than pushState, so the back button is not flooded with one entry per map movement.
Add a "Copy link" button to the place card that copies the resulting URL and shows a brief confirmation.
Acceptance criteria
Verifying
Open http://localhost:3000/map, select a place, copy the link, paste it into a new tab, confirm you land in the same place.
Scope: medium, roughly 3 hours. Some familiarity with Next.js App Router search params helps.
New to the repo? Start with CONTRIBUTING.md.
Problem
There is no way to link someone to a specific place. Opening
/mapalways lands on the default view, so if you find your exam centre you cannot send it to anyone. Reloading the page also loses whatever you had selected.Where to start
src/app/map/- the map page and its client componentid, so no data changes are neededWhat to build
Read and write four URL params:
place,lat,lng,zoom.On load, if
placeis present, select that place and open its card. If the coordinates are present, restore that viewport. Ifplacedoes not match any known id, fall back to the default view rather than erroring.While the user pans or zooms, update the URL with
history.replaceStaterather thanpushState, so the back button is not flooded with one entry per map movement.Add a "Copy link" button to the place card that copies the resulting URL and shows a brief confirmation.
Acceptance criteria
/map?place=<valid-id>opens with that place selected and centred/map?place=nonsenseloads the default view without a crash or error toastVerifying
Open
http://localhost:3000/map, select a place, copy the link, paste it into a new tab, confirm you land in the same place.Scope: medium, roughly 3 hours. Some familiarity with Next.js App Router search params helps.
New to the repo? Start with CONTRIBUTING.md.