feat(map): add POI and label hover affordance

POIs, city names, and other labeled features now show a pointer cursor
on hover, signaling that they are clickable. Matches the standard
map-app interaction pattern (Google Maps, etc.).

Implemented via MapLibre mouseenter/mouseleave handlers for interactive
layers: pois, places_locality, places_region, places_country,
places_subplace.
This commit is contained in:
Matt 2026-04-26 07:28:53 +00:00
commit 985221e8cd

View file

@ -929,6 +929,19 @@ const MapView = forwardRef(function MapView(_, ref) {
activeLayersRef.current.hillshade = true
}
} catch {}
// POI/label hover affordance cursor pointer
const interactiveLayers = ['pois', 'places_locality', 'places_region', 'places_country', 'places_subplace']
interactiveLayers.forEach(layerId => {
map.on('mouseenter', layerId, () => {
map.getCanvas().style.cursor = 'pointer'
})
map.on('mouseleave', layerId, () => {
map.getCanvas().style.cursor = ''
})
})
})
mapInstance.current = map