src/main/kotlin/com/flightfeather/uav/common/utils/MapUtil.kt
@@ -51,6 +51,7 @@
    /**
     * 获取两经纬度间的距离
     * @return 返回两点间距离,单位:米
     */
    fun getDistance(lng1: Double, lat1: Double, lng2: Double, lat2: Double): Double {
//        lat1 = lat1 || 0;
@@ -167,7 +168,7 @@
     * 判断坐标点是否在多边形内部
     */
    fun isPointInPolygon(point: Pair<Double, Double>, polygon: List<Pair<Double, Double>>): Boolean {
        if (polygon.size < 4) throw IllegalArgumentException("not a polygon")
        if (polygon.size < 3) throw IllegalArgumentException("not a polygon")
        // 不在四至范围内,则一定不在多边形内
        if (!inBBox(point, polygon)) return false