aa
This commit is contained in:
@@ -212,9 +212,9 @@ func QueryPageStores2(db *DaoDB, pageSize, offset int, keyword string, vendorSto
|
|||||||
for _, v := range shopList {
|
for _, v := range shopList {
|
||||||
if v.Address != "" && v.CityName != "" {
|
if v.Address != "" && v.CityName != "" {
|
||||||
result, _ := api.AutonaviAPI.GetCoordinateFromAddressByPageAll(v.Address, v.CityCode)
|
result, _ := api.AutonaviAPI.GetCoordinateFromAddressByPageAll(v.Address, v.CityCode)
|
||||||
coords := strings.Split(result.Pois[0].Location, ",")
|
coords := strings.Split(result.Location, ",")
|
||||||
lng, lat := utils.Str2Float64(coords[0]), utils.Str2Float64(coords[1])
|
lng, lat := utils.Str2Float64(coords[0]), utils.Str2Float64(coords[1])
|
||||||
v.DistrictName = result.Pois[0].Adname
|
v.DistrictName = result.Adname
|
||||||
v.Lng, v.Lat = lng, lat
|
v.Lng, v.Lat = lng, lat
|
||||||
if lng1 > 0 {
|
if lng1 > 0 {
|
||||||
if !(lng >= lng1 && lat >= lat1 && lng <= lng2 && lat <= lat2) {
|
if !(lng >= lng1 && lat >= lat1 && lng <= lng2 && lat <= lat2) {
|
||||||
|
|||||||
Reference in New Issue
Block a user