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.
1.4m articles
1.4m replys
5 comments
57.0k users