- GetCoordinateTownInfo
This commit is contained in:
@@ -63,6 +63,15 @@ func TestGetCoordinateDistrictCode(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetCoordinateTownInfo(t *testing.T) {
|
||||
dongguanLng := 120.982657
|
||||
dongguanLat := 31.410355
|
||||
townName, townCode := autonaviAPI.GetCoordinateTownInfo(dongguanLng, dongguanLat)
|
||||
if townName != "周市镇" || townCode != "320583102000" {
|
||||
t.Fatalf("townName:%s, townCode:%s", townName, townCode)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetDistricts(t *testing.T) {
|
||||
districtList, err := autonaviAPI.GetDistricts(1, "东莞")
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user