This commit is contained in:
苏尹岚
2020-12-24 09:59:39 +08:00
parent a82336f217
commit f4adaaaaa9
2 changed files with 3 additions and 3 deletions

View File

@@ -513,10 +513,10 @@ func (a *API) GetCoordinateCityInfo(lng, lat float64) (cityName, cityCode string
if cn, ok := addressComponent["city"].(string); ok {
cityName = cn
} 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
}