<commit_before>Site = {
    'map_options': {
        zoom: 11,
        center: new google.maps.LatLng(43.726, -79.385),
        mapTypeId: google.maps.MapTypeId.ROADMAP,
    },

    'initialize': function() {
        this.error_div = $('#error');
        this.hideError();

        this.map_div = $('#map');
        this.map = new google.maps.Map(this.map_div[0], this.map_options);
        this.fetchParkData();

        this.geocoder = new google.maps.Geocoder();
        this.address_box = $('#address');
        this.address_btn = $('#address-button');

        this.address_btn.click(function(event) {
            event.preventDefault();
            Site.searchForAddress();
        });
    },

    'showError': function(errorMessage) {
        this.error_div.show().html(errorMessage);
    },

    'hideError': function() {
        this.error_div.hide();
    },

    'searchForAddress': function() {
        var site = this;
        site.geocoder.geocode(
            {
                address: site.address_box[0].value
            },
            function (results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    var loc = results[0].geometry.location;
                    var latlng = new google.maps.LatLng(loc.lat(), loc.lng());<commit_msg>Center map when searching<commit_after>Site = {
    'map_options': {
        zoom: 11,
        center: new google.maps.LatLng(43.726, -79.385),
        mapTypeId: google.maps.MapTypeId.ROADMAP,
    },

    'initialize': function() {
        this.error_div = $('#error');
        this.hideError();

        this.map_div = $('#map');
        this.map = new google.maps.Map(this.map_div[0], this.map_options);
        this.fetchParkData();

        this.geocoder = new google.maps.Geocoder();
        this.address_box = $('#address');
        this.address_btn = $('#address-button');

        this.address_btn.click(function(event) {
            event.preventDefault();
            Site.searchForAddress();
        });
    },

    'showError': function(errorMessage) {
        this.error_div.show().html(errorMessage);
    },

    'hideError': function() {
        this.error_div.hide();
    },

    'centerMap': function(position) {
        this.map.setCenter(position);
    },

    'searchForAddress': function() {
        var site = this;
        site.geocoder.geocode(
            {
                address: site.address_box[0].value
            },
            function (results, status) {
                if (status == google.maps.GeocoderStatus.OK) {
                    var loc = results[0].geometry.location;
                    var latlng = new google.maps.LatLng(loc.lat(), loc.lng());
                    site.centerMap(latlng);
                    var marker = new google.maps.Marker({
                        position: latlng,
                        map: site.map,
                        icon: {
                            path: google.maps.SymbolPath.CIRCLE,
                            scale: 5,
                        },
                    });
{'fraction_non_alphanumeric': 0.1416421328099444, 'fraction_numerical': 0.010140660778541054, 'mean_word_length': 1.6614447345517842, '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': '3997397', 'n_tokens_mistral': 913, 'n_tokens_neox': 865, 'n_words': 139}