Show inspect tooltip only on click in map #90

This commit is contained in:
Lukas Martinelli 2017-01-22 21:16:11 +01:00
parent e4850805fb
commit 2458d4b637
2 changed files with 3 additions and 2 deletions

View file

@ -30,7 +30,7 @@
"lodash.isequal": "^4.4.0",
"lodash.throttle": "^4.1.1",
"mapbox-gl": "^0.31.0",
"mapbox-gl-inspect": "^1.2.0",
"mapbox-gl-inspect": "^1.2.1",
"mapbox-gl-style-spec": "^8.11.0",
"mousetrap": "^1.6.0",
"ol-mapbox-style": "1.0.1",

View file

@ -112,10 +112,11 @@ export default class MapboxGlMap extends React.Component {
const inspect = new MapboxInspect({
popup: new MapboxGl.Popup({
closeButton: false,
closeOnClick: false
}),
showMapPopup: true,
showMapPopupOnHover: false,
showInspectMapPopupOnHover: true,
showInspectButton: false,
buildInspectStyle: (originalMapStyle, coloredLayers) => buildInspectStyle(originalMapStyle, coloredLayers, this.props.highlightedLayer),
renderPopup: features => {