<commit_before>/*global define*/
define([
    'jquery',
    'underscore',
    'backbone',
    'templates',
    'leaflet'
], function ($, _, Backbone, JST, L) {

    'use strict';

    var View = {};

    View.MapLayout = Backbone.View.extend({
        el: '#main',
        template: JST['app/scripts/templates/map.ejs'],
        render: function() {
            console.log('render map');
            this.$el.html(this.template);

            $('#leaflet_canvas').css('height', $(window).height() - 60);

            var map = L.map('leaflet_canvas').setView([56.169401778813686, 14.864437580108644], 13);
            L.tileLayer('http://{s}.tile.cloudmade.com/4e5f745e28654b7eb26aab577eed79ee/997/256/{z}/{x}/{y}.png', {
                attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>[…]',
                maxZoom: 18
            }).addTo(map);

            _.each(this.collection.models, function(model){
                if(model.get('lat') !== null) {
                    var marker = new L.Marker([model.get('lat'), model.get('lng')]);
                    marker.bindPopup(model.get('title'));
                    marker.addTo(map);
                }
            });

            return this;
        }
    });

    return View;
});<commit_msg>Map popup fix<commit_after>/*global define*/
define([
    'jquery',
    'underscore',
    'backbone',
    'templates',
    'leaflet'
], function ($, _, Backbone, JST, L) {

    'use strict';

    var View = {};

    View.MapLayout = Backbone.View.extend({
        el: '#main',
        template: JST['app/scripts/templates/map.ejs'],
        render: function() {
            console.log('render map');
            this.$el.html(this.template);

            $('#leaflet_canvas').css('height', $(window).height() - 60);

            var map = L.map('leaflet_canvas').setView([56.169401778813686, 14.864437580108644], 13);
            L.tileLayer('http://{s}.tile.cloudmade.com/4e5f745e28654b7eb26aab577eed79ee/997/256/{z}/{x}/{y}.png', {
                attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, <a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="http://cloudmade.com">CloudMade</a>[…]',
                maxZoom: 18
            }).addTo(map);

            _.each(this.collection.models, function(model){
                if(model.get('lat') !== null) {
                    var marker = new L.Marker([model.get('lat'), model.get('lng')]);
                    marker.bindPopup(model.get('description'));
                    marker.addTo(map);
                }
            });

            return this;
        }
    });

    return View;
});
{'fraction_non_alphanumeric': 0.18710581639803783, 'fraction_numerical': 0.046250875963559916, 'mean_word_length': 2.0864864864864865, 'pattern_counts': {'":': 0, '<': 15, '<?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': '5075521', 'n_tokens_mistral': 1014, 'n_tokens_neox': 898, 'n_words': 136}