GetCoordinates() public method

public GetCoordinates ( int Id ) : List
Id int
return List
Exemplo n.º 1
0
        public JsonResult GetCoordsByDate(DateTime start, DateTime end, int id = 399)
        {
            HorizonInterface horizon = new HorizonInterface(start, end);
            var xyz = horizon.GetCoordinates(id);

            return Json(xyz, JsonRequestBehavior.AllowGet);
        }
Exemplo n.º 2
0
        // default to earth
        public JsonResult GetCoords(int id = 399)
        {
            HorizonInterface horizon = new HorizonInterface();
            var xyz = horizon.GetCoordinates(id);

            return Json(xyz, JsonRequestBehavior.AllowGet);
        }
Exemplo n.º 3
0
        public JsonResult GetPlanets()
        {
            HorizonInterface horizon = new HorizonInterface();
            Dictionary<string, List<Coord>> result = new Dictionary<string, List<Coord>>();

            result.Add("mercury", horizon.GetCoordinates(199));
            result.Add("venus", horizon.GetCoordinates(299));
            result.Add("earth", horizon.GetCoordinates(399));
            result.Add("mars", horizon.GetCoordinates(499));
            result.Add("jupiter", horizon.GetCoordinates(599));
            result.Add("saturn", horizon.GetCoordinates(699));
            result.Add("urainus", horizon.GetCoordinates(799));
            result.Add("neptune", horizon.GetCoordinates(899));
            result.Add("pluto", horizon.GetCoordinates(999));

            return Json(result, JsonRequestBehavior.AllowGet);
        }