mirror of
https://github.com/zvx-echo6/navi.git
synced 2026-05-20 22:54:42 +02:00
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:
parent
3ce860c1e8
commit
771d7eb3b3
2 changed files with 88 additions and 2 deletions
18
src/api.js
18
src/api.js
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue