<commit_before>'use strict';

angular.module('nearby').controller('NearbyController', ['$scope', 'Breweries', 'geolocation', '$stateParams',
	function($scope, Breweries, geolocation, $stateParams) {
		// Controller Logic
		// ...

    $scope.breweries = [];
    $scope.coords = {};

    geolocation.getLocation().then(function(data){
      // $scope.coords = {lat:data.coords.latitude, long:data.coords.longitude};
      $scope.coords = {lat:37.7833, long:-122.4167}; // hard code san francisco for Victor

      // current location marker
      $scope.marker.coords.latitude = $scope.coords.lat;
      $scope.marker.coords.longitude = $scope.coords.long;

      $scope.map = { center: { latitude: $scope.coords.lat, longitude: $scope.coords.long }, zoom: 10};
      Breweries.getData($scope.coords).success(handleSuccess);
    });

    var handleSuccess = function(data, status){
      $scope.breweries = data.data;
      placeMarker();
    };

    $scope.status = {
      isItemOpen: new Array($scope.breweries.length),
      isFirstDisabled: false
    };

    $scope.status.isItemOpen[0] = true;

    $scope.options = {scrollwheel: false};<commit_msg>switch to use user location<commit_after>'use strict';

angular.module('nearby').controller('NearbyController', ['$scope', 'Breweries', 'geolocation', '$stateParams',
	function($scope, Breweries, geolocation, $stateParams) {
		// Controller Logic
		// ...

    $scope.breweries = [];
    $scope.coords = {};

    geolocation.getLocation().then(function(data){
      $scope.coords = {lat:data.coords.latitude, long:data.coords.longitude};
      // $scope.coords = {lat:37.7833, long:-122.4167}; // hard code san francisco for Victor

      // current location marker
      $scope.marker.coords.latitude = $scope.coords.lat;
      $scope.marker.coords.longitude = $scope.coords.long;

      $scope.map = { center: { latitude: $scope.coords.lat, longitude: $scope.coords.long }, zoom: 10};
      Breweries.getData($scope.coords).success(handleSuccess);
    });

    var handleSuccess = function(data, status){
      $scope.breweries = data.data;
      placeMarker();
    };

    $scope.status = {
      isItemOpen: new Array($scope.breweries.length),
      isFirstDisabled: false
    };

    $scope.status.isItemOpen[0] = true;

    $scope.options = {scrollwheel: false};
{'fraction_non_alphanumeric': 0.1636520241171404, 'fraction_numerical': 0.013781223083548665, 'mean_word_length': 3.3747645951035783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '676705', 'n_tokens_mistral': 785, 'n_tokens_neox': 734, 'n_words': 127}