This commit is contained in:
苏尹岚
2020-12-22 17:58:37 +08:00
parent 6475f2df14
commit a82336f217
2 changed files with 3 additions and 3 deletions

View File

@@ -38,13 +38,13 @@ func (a *API) AccessStorePage(fullURL string, bizParams map[string]interface{})
return retVal, err
}
func (a *API) GetCoordinateFromAddressByPage(address string) (lng, lat float64, err error) {
func (a *API) GetCoordinateFromAddressByPage(address string, cityCode int) (lng, lat float64, err error) {
result, err := a.AccessStorePage("https://restapi.amap.com/v3/place/text", map[string]interface{}{
"s": "rsv3",
"key": "8325164e247e15eea68b59e89200988b",
"page": 1,
"offset": 10,
"city": 510100,
"city": cityCode,
"language": "zh_cn",
"platform": "JS",
"logversion": 2.0,