keplergl / kepler.gl

Kepler.gl is a powerful open source geospatial analysis tool for large-scale data sets.
http://kepler.gl
MIT License
10.11k stars 1.71k forks source link

Tooltip not Working at HTML Map HTM #2536

Open dafnikaravola opened 3 months ago

dafnikaravola commented 3 months ago

Describe the bug Following Bug] #2528, I face the same issue: I am running the Kepler GL Demo Locally. I saved the HTML and then opened it from my own folder. When opening the HTML locally, the tooltip function does not work. Not when I click on data on the map, and also not when I hover over the data on the map.

To Reproduce Steps to reproduce the behavior:

  1. Go to Share, Export Map, HTML, Allow users to edit map, and Export
  2. Click on downloaded HTML in download folder
  3. Hover over datapoints on map
  4. Nothing happens

Expected behavior I expect the tooltip to pop up when hovering over the datapoints on the map.

**Desktop Chrome & Opera (tried both) Version 3.0.0

Additional context Other users https://github.com/keplergl/kepler.gl/issues/2528 reported issue fixed by changing kepler.gl version to older one (2.5.5 for example). I tried several older versions but none of them work.

liuwo23 commented 3 months ago

I will try fixed it

liuwo23 commented 3 months ago

I found the issue, it was due to the version of React. In the mouse event propagation, when it passed from the component to the “__onMouseMoveDebounced” function, all the values in the event were lost. When I changed the React version in the exported HTML to 17.0.1 and 18.4.0, the issue disappeared. So, the bug lies with the React version 16.14.0.

liuwo23 commented 3 months ago

The current React version in the project is 18.2.0, while in the exported HTML it is 16.14.0, which is causing this bug due to version inconsistency.

dafnikaravola commented 3 months ago

Hi, thanks for taking the time.

I tried to replace the React version in the HTML (screenshot below). However, version 18.4.0 does not load the map at all, whereas version 17.0.1 loads the map but not the tooltips

Screenshot 2024-03-13 100556
liuwo23 commented 3 months ago

Hi, thanks for taking the time.

I tried to replace the React version in the HTML (screenshot below). However, version 18.4.0 does not load the map at all, whereas version 17.0.1 loads the map but not the tooltips

Screenshot 2024-03-13 100556

You also need to change the version of react-dom. You can try the following scripts:

Explain

liuwo23 commented 3 months ago

![Uploading 捕获.PNG…]()

mccahan commented 3 months ago

@liuwo23 do you happen to know when your fix will make it into a release?

liuwo23 commented 3 months ago

@liuwo23 do you happen to know when your fix will make it into a release?

@mccahan This needs to be reminded to the project manager. @ibgreen

FlorentLee commented 1 month ago

@liuwo23 Much appreciated your investigation! I hope this issue will be fixed in the next release.