I have closed SVG path that is the province of the country.
How to recognize point(x,y) is inside SVG path or outside by javascript?
Call document.elementFromPoint. If the position is in the path then it will return that element. If the path is not filled then you may need to adjust the pointer-events property so that it works properly.
2.1m questions
2.1m answers
60 comments
57.0k users