This commit is contained in:
suyl
2021-05-19 17:19:10 +08:00
parent b2e1afa342
commit 711885373a

View File

@@ -443,7 +443,9 @@ func (a *API) GetCoordinateFromAddressAll(address string, cityInfo string) (getC
getCoordinateFromAddressByPageAllResult.Lng = utils.Str2Float64WithDefault(locationList[0], 0)
getCoordinateFromAddressByPageAllResult.Lat = utils.Str2Float64WithDefault(locationList[1], 0)
}
getCoordinateFromAddressByPageAllResult.CityName = geocode["city"].(string)
if str, ok := geocode["city"].(string); ok {
getCoordinateFromAddressByPageAllResult.CityName = str
}
if str, ok := geocode["district"].(string); ok {
getCoordinateFromAddressByPageAllResult.AdName = str
}