<commit_before>//DBC coordinates
// var dbc = {lat: 41.8762180, lng: -87.6531470};

var soundTrekIcon = {
  url: "<%= asset_path('sound_trek_marker.png') %>",
  scaledSize: new google.maps.Size(30, 30)
}

var userIcon = {
  url: "<%= asset_path('user_marker.png') %>",
  scaledSize: new google.maps.Size(15, 15),
  anchor: new google.maps.Point(8, 7)
}

function centerMapOnCurrentLocation() {
  navigator.geolocation.getCurrentPosition(initMap, error, options)

  window.setInterval(centerMapOnCurrentLocation, 60000)
}

// remember to handle errors
function getCurrentLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(createNewSoundTrek, error, options)
  }
}

function initMap(location) {
  var map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: location.coords.latitude, lng: location.coords.longitude},
    zoom: 15
  });
  createUserMarker(map, location);
  createUserRadius(map, location);
  getSoundTreks(map, location);
}

function error(err) {
  alert("Unable to geolocate. Please enable location settings to use SoundTreks.");
};

var options = {
  enableHighAccuracy: true,
  timeout: 5000,
  maximumAge: 0
};

function getNewSoundTrekForm() {
  $('#create-sound-trek').on("click", function(event) {
    event.preventDefault();
    $(this).hide();<commit_msg>Rename variable options to geolocationOptions for clarity, restrict map control and fix zoom level at 15<commit_after>//DBC coordinates
// var dbc = {lat: 41.8762180, lng: -87.6531470};

var soundTrekIcon = {
  url: "<%= asset_path('sound_trek_marker.png') %>",
  scaledSize: new google.maps.Size(30, 30)
}

var userIcon = {
  url: "<%= asset_path('user_marker.png') %>",
  scaledSize: new google.maps.Size(15, 15),
  anchor: new google.maps.Point(8, 7)
}

function centerMapOnCurrentLocation() {
  navigator.geolocation.getCurrentPosition(initMap, error, options)
  window.setInterval(centerMapOnCurrentLocation, 60000)
}

// remember to handle errors
function getCurrentLocation() {
  if (navigator.geolocation) {
    navigator.geolocation.getCurrentPosition(createNewSoundTrek, error, geolocationOptions)
  }
}

function initMap(location) {
  var map = new google.maps.Map(document.getElementById('map'), {
    center: {lat: location.coords.latitude, lng: location.coords.longitude},
    draggable: false,
    zoom: 15,
    zoomControl: false,
    scrollwheel: false,
    disableDoubleClickZoom: true,
    streetViewControl: false
  });
  createUserMarker(map, location);
  createUserRadius(map, location);
  getSoundTreks(map, location);
}

function error(err) {
  alert("Unable to geolocate. Please enable location settings to use SoundTreks.");
};

var geolocationOptions = {
  enableHighAccuracy: true,
  timeout: 5000,
  maximumAge: 0
};

function getNewSoundTrekForm() {
  $('#create-sound-trek').on("click", function(event) {
    event.preventDefault();
    $(this).hide();
{'fraction_non_alphanumeric': 0.13664383561643836, 'fraction_numerical': 0.028082191780821917, 'mean_word_length': 4.901010101010101, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '958389', 'n_tokens_mistral': 1023, 'n_tokens_neox': 957, 'n_words': 206}