Add public land classification to PlaceDetail

Shows PAD-US land ownership data (unit name, agency hierarchy, access
status) when clicking on map areas. Upgrades "Dropped pin" name to
land unit summary on public land. Private land gets a muted indicator.

- api.js: fetchLandclass() for /api/landclass endpoint
- PlaceDetail.jsx: LandclassSection, PrivateLandIndicator components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-04-22 15:36:44 +00:00
commit 771d7eb3b3
2 changed files with 88 additions and 2 deletions

View file

@ -242,3 +242,21 @@ export async function fetchNearbyContacts(lat, lon, radiusM, signal) {
return []
}
}
/**
* Fetch PAD-US land classification for a point.
* @param {number} lat
* @param {number} lon
* @param {AbortSignal} signal
* @returns {Promise<object|null>} Classification data or null on error
*/
export async function fetchLandclass(lat, lon, signal) {
try {
const params = new URLSearchParams({ lat: String(lat), lon: String(lon) })
const resp = await fetch(`/api/landclass?${params}`, { signal })
if (!resp.ok) return null
return resp.json()
} catch {
return null
}
}