Skip to content

Add onclick event for regions #29

@d3ward

Description

@d3ward

Looking for an event listener that can be triggered when user click on a region
Similar to the onRegionSelected event but without triggering the selection

I have a map linked to a table with data for each country , for the moment a lot of data from most countries are missing .
So I set those few countries concerned as already selected as follows

Schermata 2021-03-19 alle 12 20 39

If I enable parameters like regionsSelectable I will lose track of my already selected regions
So I want that when I click on a region it returns the code and if it is not selected in the map then I show a message no data for this country , otherwise if already selected I will show the corresponding data in my table . All without interfering with the setup of the regions that are deselected/selected
As a developer I am trying to solve by myself , and I have almost achieved a good result

For now i added an isRegionsClickable parameter and exploit the portion of code by adding an if

this.container.delegate('.jvm-element', 'mouseover mouseout', function (event) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions