Skip to content

Address→Hex Lookup: Slice 1 — forward geocode + resolve containing Res-4 cell (read-only) #39

Description

@tylermalin

Part of Address → Hex Lookup & Reserve (Res 4) — see docs/prd/address-hex-lookup.md.

Goal: A user types an address, and we render the single H3 Res-4 cell that contains it. Read-only — no reservation.

Scope

  • Address autocomplete via Mapbox forward geocoding (Search Box / Geocoding v6 forward), reusing NEXT_PUBLIC_MAPBOX_TOKEN.
  • Pure resolver: (lat, lng) -> canonical Res-4 H3 index via h3-js latLngToCell(lat, lng, 4).
  • Render the cell: fly map to it, draw boundary via cellToBoundary. Reuse HexBoundaryPreview.tsx patterns.

Acceptance

  • Given a lat/lng, returns the correct Res-4 index; getResolution(index) === 4.
  • Entering a valid address highlights exactly one hex on the map.
  • No write paths touched.

TDD anchor: failing unit test for the pure resolver first (address → containing Res-4 cell), then implement; geocoding I/O mocked.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions