This commit is contained in:
suyl
2021-05-19 17:11:22 +08:00
parent 95d82054e5
commit b2e1afa342
3 changed files with 8 additions and 6 deletions

View File

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