From 985221e8cd02cc4362031f81bbd640a853bf35a1 Mon Sep 17 00:00:00 2001 From: Matt Date: Sun, 26 Apr 2026 07:28:53 +0000 Subject: [PATCH] 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. --- src/components/MapView.jsx | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/components/MapView.jsx b/src/components/MapView.jsx index 4116f1d..da86ab9 100644 --- a/src/components/MapView.jsx +++ b/src/components/MapView.jsx @@ -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