VictorCazanave / react-svg-map

A set of React.js components to display an interactive SVG map
https://victorcazanave.github.io/react-svg-map/
MIT License
229 stars 48 forks source link

Disable click behaviour on Checkbox map #45

Closed thomasbritton closed 4 years ago

thomasbritton commented 4 years ago

Hi,

Is it possible to disable all click behaviour for the Checkbox map?

I have a world map and I am currently highlighting certain countries using the selectedLocationIds but I do not want the click behaviour to fill / unfill the countries upon clicking.

Is there a better way to approach this other than using the Checkbox map?

Thanks

VictorCazanave commented 4 years ago

Hello,

I think you can use the SVGMap component and pass a function to the locationClassName prop to highlight certain countries. You can have a look at the heat map example and customize the function to fit your needs.

Feel free to re-open the issue, if you have more questions about it.