25 lines
607 B
Go
25 lines
607 B
Go
package autonavi
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"git.rosy.net.cn/baseapi/utils"
|
|
)
|
|
|
|
func TestGetCoordinateFromAddressByPage(t *testing.T) {
|
|
lng, lat, err := autonaviAPI.GetCoordinateFromAddressByPage("兴月宏干杂", 510100)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(lng, false))
|
|
t.Log(utils.Format4Output(lat, false))
|
|
}
|
|
|
|
func TestGetCoordinateFromAddressByPageAll(t *testing.T) {
|
|
result, err := autonaviAPI.GetCoordinateFromAddressByPageAll("重庆市渝北区龙山大道111号“龙湖紫都城”", 500100)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Log(utils.Format4Output(result, false))
|
|
}
|