- GetCoordinateTownInfo

This commit is contained in:
gazebo
2019-05-29 14:12:54 +08:00
parent 7537fd2696
commit f69a27d4f2
2 changed files with 29 additions and 5 deletions

View File

@@ -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 {