Skip to main content
Became Hot Network Question
edited tags
Link
Alexey Popkov
  • 62.3k
  • 7
  • 154
  • 375
Tweeted twitter.com/StackMma/status/1500033376144789505
Source Link

Tooltip in a GeoGraphics isn't working when exported as an html file.... it worked some years ago. What gives?

A few years ago, in an earlier version of Mathematica™, I had lovely results in exporting to HTML, a map made with GeoGraphics with Tooltips for counties.

I've just tried doing something similar and the Tooltip only shows the first Tooltip text. This code shows the problem when the html file is exported.

test = GeoGraphics[{Red, 
    Tooltip[Entity["Country", "Canada"]["Polygon"], "Canada"], Green, 
    Tooltip[Entity["Country", "Mexico"]["Polygon"], "Mexico"], Orange,
     Tooltip[
     Entity["AdministrativeDivision", {"Alaska", "UnitedStates"}][
      "Polygon"], "Alaska"]}];
Print[ test];
Export["test.html", test]

Mathematica and Wolfram Player work fine, but the HTML code would be more generally accessible for workmates that don't use Mathematica (or Player). I have tried viewing this file with Firefox, Chrome and Safari, all with the same disappointing result, as shown here: enter image description here

What gives? Is there a solution to this problem?