openlayers判断点是否在多边形范围内算法
testLat,testLon,polygonPoints分别是要判断的点的纬度坐标、点的经度坐标、多边形的顶点数组注:openlayers获取多边形的顶点坐标数组时,最后一个点的坐标与起始点坐标相同,记得将最后一个点的坐标排除出去 function IsPointInPolygon(testLat,testLon,polygonPoints){ if (polygonPoints.length < 3) return false; let iSum = 0,iCount =
原创
2021-10-28 09:54:28 ·
1651 阅读 ·
0 评论