<commit_before>// Get all wells
var $wellData = {};

var map;
function initMap() {

$.ajax({
  type: 'GET',
  dataType: "json",
  url: '/api/well/',
  success: function(data, textStatus) {
    // Handle success
    $wellData = data.results;
    console.log($wellData);

    var  map = new google.maps.Map(document.getElementById('all_well_map'), {
        center: {lat: 36.9930780, lng: -79.9046890},
        zoom: 9,
        scrollwheel: false,
        mapTypeId: 'terrain',
        styles: [
             {
               featureType: 'all',
               stylers: [
                 { saturation: 100 }
               ]
             }
           ]
      });

      var bounds = new google.maps.LatLngBounds();
      var infowindow = new google.maps.InfoWindow();

      var image = {
            url: 'https://wellcom-staging.herokuapp.com/static/images/BlueSymbol.png',
            scaledSize: new google.maps.Size(45, 56),
          };


      var marker, i;

      for (i = 0; i < $wellData.length; i++) {

          marker = new google.maps.Marker({
              // position: new google.maps.LatLng($wellData[i].latitude, $wellData[i].longitude),
              position: new google.maps.LatLng(Number($wellData[i].latitude), Number($wellData[i].longitude)),
              map: map,
              icon: image,
          });

          bounds.extend(marker.position);

          google.maps.event.addListener(marker, 'click', (function(marker, i) {
              return function() {
              infowindow.setContent('<h4>' + $wellData[i].name + '</h4>'
                  + '<h5> latitude:  ' + $wellData[i].latitude + '</h5>' +
                    '<h5> longitude:  ' + $wellData[i].longitude + '</h5>');
              infowindow.open(map, marker);
    }
  })(marker, i));
    map.fitBounds(bounds);
      }

  },
  error: function(xhr, textStatus, errorThrown) {
    // Handle error
    console.log('Error getting the Well Data');
  }

});
}<commit_msg>Updated details displayed when clicking on map point<commit_after>// Get all wells
var $wellData = {};

var map;
function initMap() {

$.ajax({
  type: 'GET',
  dataType: "json",
  url: '/api/well/',
  success: function(data, textStatus) {
    // Handle success
    $wellData = data.results;
    console.log($wellData);

    var  map = new google.maps.Map(document.getElementById('all_well_map'), {
        center: {lat: 36.9930780, lng: -79.9046890},
        zoom: 9,
        scrollwheel: false,
        mapTypeId: 'terrain',
        styles: [
             {
               featureType: 'all',
               stylers: [
                 { saturation: 100 }
               ]
             }
           ]
      });

      var bounds = new google.maps.LatLngBounds();
      var infowindow = new google.maps.InfoWindow();

      var image = {
            url: 'https://wellcom-staging.herokuapp.com/static/images/BlueSymbol.png',
            scaledSize: new google.maps.Size(45, 56),
          };


      var marker, i;

      for (i = 0; i < $wellData.length; i++) {

          marker = new google.maps.Marker({
              // position: new google.maps.LatLng($wellData[i].latitude, $wellData[i].longitude),
              position: new google.maps.LatLng(Number($wellData[i].latitude), Number($wellData[i].longitude)),
              map: map,
              icon: image,
          });

          bounds.extend(marker.position);

          google.maps.event.addListener(marker, 'click', (function(marker, i) {
              return function() {
              infowindow.setContent('<h4>' + $wellData[i].name + '</h4>'
                  + '<h5> Flowing since:  ' + $wellData[i].date_installed + '</h5>' +
                    '<h5> Last updated:  ' + $wellData[i].last_update.split('T')[0] + '</h5>' +
                    '<h5> Battery:  ' + $wellData[i].batt_percent_charged + '%' + '</h5>');
              infowindow.open(map, marker);
    }
  })(marker, i));
    map.fitBounds(bounds);
      }

  },
  error: function(xhr, textStatus, errorThrown) {
    // Handle error
    console.log('Error getting the Well Data');
  }

});
}
{'fraction_non_alphanumeric': 0.15700660308143802, 'fraction_numerical': 0.016874541452677916, 'mean_word_length': 1.900709219858156, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 17, 'https://': 2, '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': '3284393', 'n_tokens_mistral': 1335, 'n_tokens_neox': 1262, 'n_words': 253}