I'm using Canvas to create polygons like this:


I want each of those polygons to represent a clickable province. How do I know which province is clicked when the user clicks on something? I have a list of vertices (thousands) but I feel like each time looking for the closest vertex is too slow (I think I might be wrong). What's a fast way to do it? Thanks.


Browse other questions tagged .