<commit_before>create_map = (user_position) ->
  mapContainer = document.getElementById("mapContainer")

  coords = user_position.coords
  user_location = [coords.latitude, coords.longitude]

  map = new nokia.maps.map.Display mapContainer, {
    # Centred on Lat/Long for Glasgow
    center:      [55.858, -4.2590],
    zoomLevel:   12,
    components:  [
      new nokia.maps.map.component.Behavior(), # Map Pan/Zoom
    ]
  }
  console.log 'first'
  console.log map

  standardMarker = new nokia.maps.map.StandardMarker user_location, {text: "Me"}
  map.objects.add standardMarker

  map


$ ->
  nokia.Settings.set 'app_id', 'dAeplRpqXA3pPri5MWDE'
  nokia.Settings.set 'app_code', '0taRg556WF-uaMDhXddFtw'

  navigator.geolocation.getCurrentPosition (user_location) ->
    map = create_map user_location
    show_cycle_racks = ->
      $.getJSON '/cycle-racks.geojson', (data) ->
        clusterProvider = new nokia.maps.clustering.ClusterProvider map, {
          eps:         16,
          minPts:      1,
          dataPoints:  []
        }

        for point in data.features
          coords = point.geometry.coordinates.reverse()
          clusterProvider.add {latitude: coords[0], longitude: coords[1]}
         # marker = new nokia.maps.map.StandardMarker coords
         # map.objects.add marker
        clusterProvider.cluster()

    $('#cycle_racks').click ->
      show_cycle_racks()
      $(this).hide()

<commit_msg>comment kill<commit_after>create_map = (user_position) ->
  mapContainer = document.getElementById("mapContainer")

  coords = user_position.coords
  user_location = [coords.latitude, coords.longitude]

  map = new nokia.maps.map.Display mapContainer, {
    # Centred on Lat/Long for Glasgow
    center:      [55.858, -4.2590],
    zoomLevel:   12,
    components:  [
      new nokia.maps.map.component.Behavior(), # Map Pan/Zoom
    ]
  }

  standardMarker = new nokia.maps.map.StandardMarker user_location, {text: "Me"}
  map.objects.add standardMarker

  map


$ ->
  nokia.Settings.set 'app_id', 'dAeplRpqXA3pPri5MWDE'
  nokia.Settings.set 'app_code', '0taRg556WF-uaMDhXddFtw'

  navigator.geolocation.getCurrentPosition (user_location) ->
    map = create_map user_location
    show_cycle_racks = ->
      $.getJSON '/cycle-racks.geojson', (data) ->
        clusterProvider = new nokia.maps.clustering.ClusterProvider map, {
          eps:         16,
          minPts:      1,
          dataPoints:  []
        }

        for point in data.features
          coords = point.geometry.coordinates.reverse()
          clusterProvider.add {latitude: coords[0], longitude: coords[1]}

        clusterProvider.cluster()

    $('#cycle_racks').click ->
      show_cycle_racks()
      $(this).hide()


{'fraction_non_alphanumeric': 0.11855104281009879, 'fraction_numerical': 0.016831320892791803, 'mean_word_length': 2.7400820793433653, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3680973', 'n_tokens_mistral': 944, 'n_tokens_neox': 886, 'n_words': 163}