vue-world-map
vue-world-map copied to clipboard
Hover events added
mouseenter and mouseleave event listeners added so that additional data/effects can be shown on hover of the country. Readme updated to document the same functionality
Hello @mrityunjaygr8, thanks for your PR.
Could you add an example in the doc on how to get the current selected country and its value? Currently I get a VueComponent with many nested properties, and I don't know how to retrieve data about the current country, in order to display a tooltip.
I think also that the color bar should be deactivable with a property.
Hi @frossigneux Yes the color bar should be deactivatable via a property, I will push a patch for that soon. Regarding the example, I'll try to add an example.
Hi @frossigneux
I've updated the package now. The colorBar is now optional using the showColorBar property. Further, I've corrected my mistake due to which on_mouseleave and on_mouseneter were throwing extra data about the VueComponent. Now they are returning the Country's ISO 3166 Code, which we use in the countryData propery, so we can get the value from the countryData propery itself.
In order to show the country's full name, currently I use another Object which has the ISO 3166 code as the key and Country's full name as the value. eg. country_full_name = { "US": "United States", .... }