baidu lbs2

This commit is contained in:
jiangyong27 2024-06-28 22:24:42 +08:00
parent 24ac136efc
commit 7b2512861b
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ func NewLbs(ak string) *Lbs {
} }
func (l *Lbs) GetAddress(lng, lat float64) (string, error) { func (l *Lbs) GetAddress(lng, lat float64) (string, error) {
reqUrl := fmt.Sprintf("https://api.map.baidu.com/reverse_geocoding/v3/?ak=s&output=json&coordtype=wgs84&location=%f,%f", l.ak, lat, lng) reqUrl := fmt.Sprintf("https://api.map.baidu.com/reverse_geocoding/v3/?ak=%s&output=json&coordtype=wgs84&location=%f,%f", l.ak, lat, lng)
rspBody, err := goutil.HttpGet(reqUrl, nil) rspBody, err := goutil.HttpGet(reqUrl, nil)
if err != nil { if err != nil {
return "", err return "", err