func TestList(t *testing.T) { c, done, _ := aetest.NewContext() defer done() ds := service.FromContext(c) //geo.LoadPolygonFromFile(ds) //time.Sleep(10000) t.Log("calling") resp := geo.PointInPolygon(ds, 13.477646709852323, 80.18274600000001) t.Log("exiting") t.Log(resp) }
func Point(c *gin.Context) { rec := &geo.Point{} c.BindJSON(rec) resp := geo.PointInPolygon(c, getStore(c), rec.Lat, rec.Lng) c.JSON(http.StatusOK, resp) }