diff --git a/src/components/map/InspectionMap.jsx b/src/components/map/InspectionMap.jsx index 4b5dd736..892a7ecf 100644 --- a/src/components/map/InspectionMap.jsx +++ b/src/components/map/InspectionMap.jsx @@ -89,7 +89,11 @@ export default class InspectionMap extends React.Component { }) }) - map.on('click', this.displayPopup.bind(this)); + map.on('click', this.displayPopup.bind(this)) + map.on('mousemove', function(e) { + var features = map.queryRenderedFeatures(e.point, { layers: this.layers }) + map.getCanvas().style.cursor = (features.length) ? 'pointer' : '' + }) } displayPopup(e) { diff --git a/src/components/map/MapboxGlMap.jsx b/src/components/map/MapboxGlMap.jsx index 1c4888ba..788a6556 100644 --- a/src/components/map/MapboxGlMap.jsx +++ b/src/components/map/MapboxGlMap.jsx @@ -68,6 +68,10 @@ export default class MapboxGlMap extends React.Component { }) map.on('click', this.displayPopup.bind(this)); + map.on('mousemove', function(e) { + var features = map.queryRenderedFeatures(e.point, { layers: this.layers }) + map.getCanvas().style.cursor = (features.length) ? 'pointer' : '' + }) } displayPopup(e) {