aa
This commit is contained in:
@@ -513,10 +513,15 @@ 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"].([]interface{})[0])
|
if s, ok := addressComponent["province"].(string); ok {
|
||||||
|
cityName = s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cityCode = utils.Interface2String(addressComponent["citycode"].([]interface{})[0])
|
}
|
||||||
|
if s, ok := addressComponent["citycode"].(string); ok {
|
||||||
|
cityCode = s
|
||||||
|
}
|
||||||
|
// cityCode = utils.Interface2String(addressComponent["citycode"])
|
||||||
}
|
}
|
||||||
return cityName, cityCode
|
return cityName, cityCode
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user