intersecting polygons and polylines, using google maps API v3

后端 未结 2 1490
感动是毒
感动是毒 2021-01-28 20:44

I have a polygon and polyline created dynamically. Now I need to check whether they both intersect each other or not.

How do I achieve this? Googling hasn\'t provided an

2条回答
  •  花落未央
    2021-01-28 21:19

    Look at Turf.js it provides you very simple lineIntersect method you pass it coordinates1, coordinates2 and it gives you the array of exact intersections. Turf.js lineIntersect documentation

提交回复
热议问题