src/main/resources/public/geolocation.js
//function to populate nearby restaurants, n^2
function to populate nearby restaurants, n^2
function to populate nearby restaurants n^2
function populateRestaurants() {
  for (i = 0; i < restaurants.length; i++) {
    var isFavorite = false;
    for (j = 0; j < userFavorites.length; j++) {
      if (userFavorites[j].restaurantID == restaurants[i].id) {
        j = userFavorites.length;
        isFavorite = true;
      }
    }
    if (isFavorite) {
      geocodeAddress(restaurants[i].address, 2, i);
    } else {
      geocodeAddress(restaurants[i].address, 0, i);
    }
  }
}
function populateRestaurants ( ) { for ( i = 0 ; i < restaurants . length ; i ++ ) { var isFavorite = false ; for ( j = 0 ; j < userFavorites . length ; j ++ ) { if ( userFavorites [ j ] . restaurantID == restaurants [ i ] . id ) { j = userFavorites . length ; isFavorite = true ; } } if ( isFavorite ) { geocodeAddress ( restaurants [ i ] . address , 2 , i ) ; } else { geocodeAddress ( restaurants [ i ] . address , 0 , i ) ; } } }
function to populate nearby restaurants, n^2
function to populate nearby restaurants n^2
//check if restaurant is a favorite one  //create markers 