aa
This commit is contained in:
@@ -513,10 +513,10 @@ func (a *API) GetCoordinateCityInfo(lng, lat float64) (cityName, cityCode string
|
|||||||
if cn, ok := addressComponent["city"].(string); ok {
|
if cn, ok := addressComponent["city"].(string); ok {
|
||||||
cityName = cn
|
cityName = cn
|
||||||
} else {
|
} else {
|
||||||
cityName = utils.Interface2String(addressComponent["province"])
|
cityName = utils.Interface2String(addressComponent["province"].([]interface{})[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cityCode = utils.Interface2String(addressComponent["citycode"])
|
cityCode = utils.Interface2String(addressComponent["citycode"].([]interface{})[0])
|
||||||
}
|
}
|
||||||
return cityName, cityCode
|
return cityName, cityCode
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ func init() {
|
|||||||
sugarLogger = logger.Sugar()
|
sugarLogger = logger.Sugar()
|
||||||
baseapi.Init(sugarLogger)
|
baseapi.Init(sugarLogger)
|
||||||
api = New("5lyyrvHODG6wC8Sdr3a9h", "iFrkUDmR2g5eqQpfh2kQ57", "WTn53qd6WAAdLMXfmXvzb7", "dGZcR0XGGg7H5Pd7FR3n47")
|
api = New("5lyyrvHODG6wC8Sdr3a9h", "iFrkUDmR2g5eqQpfh2kQ57", "WTn53qd6WAAdLMXfmXvzb7", "dGZcR0XGGg7H5Pd7FR3n47")
|
||||||
api.CBSetToken("49f654af807d86b92059f01dea834f37cf2025b9853d4001406da091650e842e")
|
api.CBSetToken("cf74937695849a89bcb414e49f03702416b49024a49e7f62570280f99eb63b58")
|
||||||
// ef364b677911fa64d41a25d22d5e155065c4898046be65ddd627fa6c8cd87c2e
|
// ef364b677911fa64d41a25d22d5e155065c4898046be65ddd627fa6c8cd87c2e
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user