<commit_before>Brooklyn.location = (function() {
    var map;

    function drawCircles() {
        var lat = 55;
        var lng = -2.5;

        var circle_latlong = new google.maps.LatLng(lat, lng);
        var circle_options = {
            map: map,
            center: circle_latlong,
            clickableboolean: false,
            fillColor: "#FF0000",
            fillOpacity: 0.4,
            radius: 50000, // meters
            strokeColor: "#FF0000",
            strokeOpacity: 1,
            strokeWeight: 1,
            zIndex: 1
        };

        var circle = new google.maps.Circle(circle_options);
    }

  function drawMap() {
    var latlng = new google.maps.LatLng(55.6, -2.5);
    var myOptions = {
      zoom: 2,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
      map = new google.maps.Map(document.getElementById("circles-map"),
                                myOptions);
  }

    function init() {
        drawMap();
        drawCircles();
    }

    return {init: init};
})();

$(document).ready(Brooklyn.location.init);<commit_msg>Refactor circle drawer and start on doing it with real data.<commit_after>Brooklyn.location = (function() {
    var map;

    function drawCircle(lat, lng, radius) {
        var circle_latlong = new google.maps.LatLng(lat, lng);
        var circle_options = {
            map: map,
            center: circle_latlong,
            clickableboolean: false,
            fillColor: "#FF0000",
            fillOpacity: 0.4,
            radius: radius, // meters
            strokeColor: "#FF0000",
            strokeOpacity: 1,
            strokeWeight: 1,
            zIndex: 1
        };

        var circle = new google.maps.Circle(circle_options);
    }

    function hardcodedCircleDrawer() {
        drawCircle(-2, 56, 100000);
    }

    function drawCircles() {
        $.getJSON("circles", drawCirclesFromJSON).error(
                function() {$(Brooklyn.eventBus).trigger('update_failed', "Could not get location size data for circle drawing.");}
            );
    }

    function drawCirclesFromJSON(json) {
        // TODO
    }

  function drawMap() {
    var latlng = new google.maps.LatLng(55.6, -2.5);
    var myOptions = {
      zoom: 2,
      center: latlng,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
      map = new google.maps.Map(document.getElementById("circles-map"),
                                myOptions);
  }

    function init() {
        drawMap();
        hardcodedCircleDrawer();
//        drawCircles();
    }

    return {init: init};
})();

$(document).ready(Brooklyn.location.init);
{'fraction_non_alphanumeric': 0.12009149828440717, 'fraction_numerical': 0.02134959969500572, 'mean_word_length': 1.8398268398268398, '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': '5514494', 'n_tokens_mistral': 836, 'n_tokens_neox': 778, 'n_words': 171}