Skip to content

hwsdien/distance

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Distance

计算两地球坐标点的直线距离, 相距多少米。
示例
package main

import (
    "fmt"
    "github.com/hwsdien/distance"
)

func main() {
    lng1 := 112.99266052246
    lat1 := 28.212518692017

    lng2 := 112.992158944
    lat2 := 28.2136793274

    data := distance.GetDistance(lng1, lat1, lng2, lat2)
    fmt.Println(data)
}

About

计算两坐标点的距离

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages