Add hillshade and traffic overlay layers with layer control UI

- New LayerControl component with popover toggles for hillshade/traffic
- MapView: add/remove hillshade raster-dem and traffic raster layers
- Overlay layers persist in localStorage, survive theme swaps
- Hillshade defaults ON, traffic defaults OFF when available

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt 2026-04-21 00:52:20 +00:00
commit 4020d5ae0a
4 changed files with 362 additions and 2 deletions

View file

@ -6,6 +6,7 @@ import { decodePolyline } from './utils/decode'
import MapView from './components/MapView'
import Panel from './components/Panel'
import PlaceDetail from './components/PlaceDetail'
import LayerControl from './components/LayerControl'
export default function App() {
const mapViewRef = useRef(null)
@ -106,6 +107,7 @@ export default function App() {
<MapView ref={mapViewRef} />
<Panel onManeuverClick={handleManeuverClick} />
<PlaceDetail />
<LayerControl mapRef={mapViewRef} />
</div>
)
}