eurostat / eurostat-map.js

Reusable library to quickly create and customise web maps showing Eurostat data directly retrieved from Eurostat database.
https://github.com/eurostat/eurostat-map.js
Other
60 stars 4 forks source link

Tooltip now configured with object via single accessor method #97

Closed joewdavies closed 3 years ago

joewdavies commented 3 years ago

E.g. instead of

map.textFunction((rg => { return rg.properties.na; })); 
map.tooltipShowFlags(false); 

the tooltip is now configured with:

map.tooltip(
    maxWidth: "200px",
    fontSize: "16px",
    background: "white",
    padding: "5px",
    border: "0px",
    borderRadius: "5px",
    boxShadow: "5px 5px 5px grey",
    transitionDuration: 200,
    xOffset: 30,
    yOffset: 20,
    textFunction: (rg => { return rg.properties.na; }),
    showFlags: false
});