Overview
The Interactive County Map is the primary interface for military families to discover their next hometown. Powered by Leaflet and vector similarity search, users can explore 3,222 US counties using natural language queries like “sunny coastal areas” or “affordable midwest with good schools.”
Key Features
Natural Language Search
- Semantic Search: Type phrases like “warm coastal state with no income tax”
- Vector Similarity: Results ranked by relevance percentage (e.g., 14% match)
- County Name Search: Also supports traditional county/state name searches
- Real-time Results: Dropdown shows matching counties as you type

Interactive Map Display
- 3,222 Counties: Complete US coverage including territories
- Color-Coded Markers:
- 🟢 Green: Partner broker available
- 🔵 Blue: Opportunity (no broker yet)
- 🟡 Yellow: Military specialist broker
- GeoJSON Boundaries: County borders highlighted on hover
- Zoom Controls: Navigate from national to street level
State Filter Dropdown
- Filter counties by state
- Quick access to all 52 states and territories
- Combined with search for precise targeting
Legend
- Visual key explaining marker colors
- Always visible for reference
County Popups
Available Counties (No Broker)

When clicking a county without a broker partner:
- County Name & State: Clear identification
- “AVAILABLE” Badge: Indicates opportunity
- County Description: Auto-generated content about the area
- “Become a Partner” CTA: Links to broker application
Partner Counties

When clicking a county with an assigned broker:
- County Name & State: Clear identification
- “PARTNER BROKER” Badge: Shows coverage status
- County Description: Rich content about the area
- Broker Card: Shows brokerage name and tier (basic/premium)
- “Request More Info” Button: Opens lead submission form
Lead Submission Flow

When a user clicks “Request More Info”:
- Modal Dialog Opens: Focused form experience
- Pre-filled Context: County name shown in header
- Required Fields: First name, last name, email
- Optional Fields: Phone, moving from location, additional details
- Submit Request: Creates lead in system, notifies broker
Form Fields
| Field | Required | Placeholder |
|---|---|---|
| First Name | Yes | John |
| Last Name | Yes | Smith |
| Yes | john@example.com | |
| Phone | No | (555) 123-4567 |
| Moving From | No | San Diego, CA |
| Additional Details | No | Tell us about your timeline… |
Technology Stack
- Leaflet.js: Open-source mapping library
- React Leaflet: React bindings for Leaflet
- CARTO Tiles: Beautiful basemap styling
- sqlite-vec: Vector similarity search
- Ollama: Embedding generation (mxbai-embed-large)
URL Structure
/map # Main map view
/map?county=16001 # Direct link to Ada County, Idaho (FIPS)
/map?state=ID # Filter to Idaho counties
Testing Results
- ✅ Map loads with all 3,222 county markers
- ✅ Semantic search returns relevant results
- ✅ County popups display correct broker status
- ✅ Lead form submits successfully
- ✅ Mobile responsive with touch interactions
- ✅ GeoJSON boundaries render correctly
- ✅ State filter narrows results appropriately