portfolio/src/main/java/com/google/sps/data/Grid.java
public static Grid createFromLatLng(double lat, double lng){
    int row = (int)((MarkerServlet.LAT_NORTH_LIMIT - lat) / LAT_DIFF);
    int col = (int)((Math.abs(MarkerServlet.LNG_WEST_LIMIT) - Math.abs(lng)) / LNG_DIFF);
    System.out.println("row is: " + row + " col is: " + col);
    return new Grid(row, col); 
  }
//Converts lat and lng of a point to the x and y coordinate of the grid
Converts lat and lng of a point to the x and y coordinate of the grid
Converts lat and lng of a point to the x and y coordinate of the grid
public static Grid createFromLatLng(double lat, double lng){
    int row = (int)((MarkerServlet.LAT_NORTH_LIMIT - lat) / LAT_DIFF);
    int col = (int)((Math.abs(MarkerServlet.LNG_WEST_LIMIT) - Math.abs(lng)) / LNG_DIFF);
    System.out.println("row is: " + row + " col is: " + col);
    return new Grid(row, col); 
  }
public static Grid createFromLatLng ( double lat , double lng ) { int row = ( int ) ( ( MarkerServlet . LAT_NORTH_LIMIT - lat ) / LAT_DIFF ) ; int col = ( int ) ( ( Math . abs ( MarkerServlet . LNG_WEST_LIMIT ) - Math . abs ( lng ) ) / LNG_DIFF ) ; System . out . println ( "row is: " + row + " col is: " + col ) ; return new Grid ( row , col ) ; }
Converts lat and lng of a point to the x and y coordinate of the grid
Converts lat and lng of a point to the x and y coordinate of the grid