func distanceBetween(#lat1: Float, lng1: Float, lat2: Float, lng2: Float) -> Float{ var jl_jd: Float = 102834.74258026089786013677476285 var jl_wd: Float = 111712.69150641055729984301412873 var b: Float = abs((lng1 - lng2) * jl_jd) var a: Float = abs((lat1 - lat1) * jl_wd) return sqrt(a * a + b * b) }
时间: 2024-10-11 22:09:05