我有从叶子geoJSON地图中选择的两组多边形坐标.父和子坐标的坐标是:
var parentCoordinates=[
[
32.05898221582174,
-28.31004731142091
],
[
32.05898221582174,
-28.308044824292978
],
[
32.06134255975485,
-28.308044824292978
],
[
32.06134255975485,
-28.31004731142091
],
[
32.05898221582174,
-28.31004731142091
]
]
var childCoordinates=[
[
32.059904895722866,
-28.30970726909422
],
[
32.059904895722866,
-28.308743809931784
],
[
32.06089194864035,
-28.308743809931784
],
[
32.06089194864035,
-28.30970726909422
],
[
32.059904895722866,
-28.30970726909422
]
]
Run Code Online (Sandbox Code Playgroud)
使用Ray Casting算法确定点是否位于多边形内部我无法确定结果我得到的是假.请让我知道我在哪里做错了或以其他方式确定解决方案.谢谢
javascript polygon angularjs leaflet angular-leaflet-directive