package ditu

import (
	"testing"

	"git.rosy.net.cn/baseapi/utils"
	"git.rosy.net.cn/jx-callback/globals/testinit"
)

func init() {
	testinit.Init()
}

func TestGetCityCoordinateLists(t *testing.T) {
	// coords := GetDistrictCoordinateList(510116, 5*1000, 3*1000)
	coords := GetCityCoordinateList(210200, 8*1000, 2*1000)
	t.Log(len(coords))
	// t.Log(utils.Format4Output(coords, false))
	var list []map[string]interface{}
	for _, v := range coords {
		list = append(list, map[string]interface{}{
			"position": []float64{v.Lng, v.Lat},
		})
	}
	t.Log(utils.Format4Output(list, true))
}
