public static CoordinateEntity GetCoordinateEntity(int column, string row) { var _return = new CoordinateEntity(); _return.TriangleColumn = column.ToString(); _return.TriangleRow = row.ToUpper(); int r = GetRowNumeric(row); if (column % 2 == 0) { // even _return.TopY = (column - 1) * 10; _return.BottomY = -1; _return.TopX = _return.TopY + 10; _return.BottomX = r * 10; } else { // odd _return.TopY = (column - 1) * 10; _return.BottomY = r + 10; _return.TopX = -1; _return.BottomX = r * 10; } return(_return); }
public static Coordinate Map(CoordinateEntity entity) { return(new Coordinate() { Id = entity.Id, CubeId = entity.CubeId, X = entity.X, Y = entity.Y, Z = entity.Z, Value = entity.Value }); }
public IActionResult GetExploreList(string Latitude, string Longitude) { try { CoordinateEntity coordinates = new CoordinateEntity(); coordinates.Latitude = Latitude; coordinates.Longitude = Longitude; (List <AttractionEntity>, List <RestaurantEntity>)res = _exploreService.GetExploreList(coordinates); return(Ok(new Dictionary <string, dynamic> { { "attractions", res.Item1 }, { "restaurants", res.Item2 } })); } catch { return(BadRequest()); } }
public (List <AttractionEntity>, List <RestaurantEntity>) GetExploreList(CoordinateEntity coordinates) { return(_getExploreList.ReturnList(coordinates)); }