<commit_before>var map;
var infoWindow;

function initMap() {
  map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: 47.604, lng: -122.33},
    zoom: 8
  });

  infoWindow = new google.maps.InfoWindow();
  google.maps.event.addListener(map, 'click', function() {
    infoWindow.close();
  });
}

function displayMarkers(markersData) {
  var bounds = new google.maps.LatLngBounds();

  for (var i = 0; i < markersData.length; i++) {
    var latlng = new google.maps.LatLng(markersData[i].lat, markersData[i].lng);
    var dateTime = markersData[i].dateTime;
    var incidentNum = markersData[i].incidentNum;
    var level = markersData[i].level;
    var address = markersData[i].address;
    var status = markersData[i].status;
    var type = markersData[i].type;
    var units = markersData[i].units;

    var markerColor;
    if (markersData[i].status == 'active') markerColor = '../img/green-dot.png';
    else if (markersData[i].type.match(/Medic/gi)) markerColor = '../img/first-aid.png';
    else if (markersData[i].type.match(/MVI/gi)) markerColor = '../img/blue-dot.png';
    else if (markersData[i].type.match(/Fire/gi)) markerColor = '../img/fire.png';
    else markerColor = '../img/red-dot.png';

    createMarker(latlng, dateTime, address, type, incidentNum, markerColor, status);
    bounds.extend(latlng);
  }

  map.fitBounds(bounds);
}

function createMarker(latlng, dateTime, address, type, incidentNum, markerColor, status) {
  var marker = new google.maps.Marker({<commit_msg>Front end check of latlng values before render to map<commit_after>var map;
var infoWindow;

function initMap() {
  map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: 47.604, lng: -122.33},
    zoom: 8
  });

  infoWindow = new google.maps.InfoWindow();
  google.maps.event.addListener(map, 'click', function() {
    infoWindow.close();
  });
}

function displayMarkers(markersData) {
  var bounds = new google.maps.LatLngBounds();

  for (var i = 0; i < markersData.length; i++) {
    if (markersData[i].lat.length === 0 || markersData[i].lng.length === 0) {
      console.log('No marker lat lng values');
    } else {
      var latlng = new google.maps.LatLng(markersData[i].lat, markersData[i].lng);
      var dateTime = markersData[i].dateTime;
      var incidentNum = markersData[i].incidentNum;
      var level = markersData[i].level;
      var address = markersData[i].address;
      var status = markersData[i].status;
      var type = markersData[i].type;
      var units = markersData[i].units;

      var markerColor;
      if (markersData[i].status == 'active') markerColor = '../img/green-dot.png';
      else if (markersData[i].type.match(/Medic/gi)) markerColor = '../img/first-aid.png';
      else if (markersData[i].type.match(/MVI/gi)) markerColor = '../img/blue-dot.png';
      else if (markersData[i].type.match(/Fire/gi)) markerColor = '../img/fire.png';
      else markerColor = '../img/red-dot.png';

      createMarker(latlng, dateTime, address, type, incidentNum, markerColor, status);
      bounds.extend(latlng);
    }
  }

  map.fitBounds(bounds);
}

function createMarker(latlng, dateTime, address, type, incidentNum, markerColor, status) {
  var marker = new google.maps.Marker({
{'fraction_non_alphanumeric': 0.16031941031941033, 'fraction_numerical': 0.007985257985257985, 'mean_word_length': 3.580872011251758, 'pattern_counts': {'":': 0, '<': 5, '<?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': '450340', 'n_tokens_mistral': 1123, 'n_tokens_neox': 1073, 'n_words': 235}