aa
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -18,7 +18,7 @@ func init() {
|
||||
sugarLogger = logger.Sugar()
|
||||
baseapi.Init(sugarLogger)
|
||||
api = New("6a3e2073-1850-413b-9eb7-6c342ec36e1c", "a8248088-a742-4c33-a0db-03aeae00ca7d")
|
||||
api.SetToken("n-5ab70454-9ed6-4bf2-9215-b4646eb17992-w")
|
||||
// api.SetToken("n-5ab70454-9ed6-4bf2-9215-b4646eb17992-w")
|
||||
}
|
||||
|
||||
func TestGetAccessToken(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user