kepler.gl icon indicating copy to clipboard operation
kepler.gl copied to clipboard

Tooltip not Working When Exporting Map HTML [Bug]

Open margootje123 opened this issue 1 year ago • 7 comments
trafficstars

Describe the bug I am running the Kepler GL Demo Locally. I have saved the HTML and then opened 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:

  • Browser Chrome and Edge tried both
  • Version 3.0.0
image

margootje123 avatar Feb 21 '24 14:02 margootje123

I just want to confirm that I also reproduce this error (windows 11, Chrome). Tooltips not working when map is exported as HTML.

I found a workaround and probably the cause of the problem. In HTML you can try to change kepler.gl version to older one (I tried 2.5.5) and for me tooltips started working: image

Of course, this is by no means a workaround, but it does confirm (as far as I understand) that the bug is present in version 3.0.0. Maybe this will help in further investigating the error.

AndriusGeo avatar Feb 26 '24 18:02 AndriusGeo

@AndriusGeo Thanks so much! Changing the version indeed resolved the issue for me as well. Seems to be a bug then with the latest version, fingers crossed this gets updated some time soon.

margootje123 avatar Feb 28 '24 10:02 margootje123

Hey, I'm facing the same issue with @margootje123 (tried both Chrome & Opera), but the issue does not resolve with @AndriusGeo trick. Any other ideas?

dafnikaravola avatar Mar 07 '24 11:03 dafnikaravola

I found the issue is due to React version

Hey, I'm facing the same issue with @margootje123 (tried both Chrome & Opera), but the issue does not resolve with @AndriusGeo trick. Any other ideas?

This bug is caused by the inconsistency between the React version used in the project and the React version in the HTML template. I can fix it. Can someone review and approve the code?

liuwo23 avatar Mar 13 '24 02:03 liuwo23

Hey, I have the same issue, any progress here?

IlyaSolomatin avatar Jun 24 '24 10:06 IlyaSolomatin

Hey, I have the same issue, any progress here?

You need to replace the version of react in the exported HTML file, you can also refer to this issue for guidance #https://github.com/keplergl/kepler.gl/pull/2556

liuwo23 avatar Jun 24 '24 14:06 liuwo23

@IlyaSolomatin Thanks for the fix! Your solution as described in https://github.com/keplergl/kepler.gl/blob/421c09053bc48da473100495be10538d6547585a/src/utils/src/export-map-html.ts#L48-L52 Works well for firefox, safari and chrome as of today! I hope someone from the core developers team approves the pull request.

abcnishant007 avatar Sep 18 '24 09:09 abcnishant007

The issue is fixed.

igorDykhta avatar Dec 05 '24 03:12 igorDykhta