<commit_before>'use strict';

angular.module('arachne.widgets.map')

/**
 * @author: <NAME>
 */
    .directive('entitymap', [function() {
            return {
                restrict: 'A',
                scope: {
                    places: "="
                },
                link: function (scope, element, attrs) {

                    var map = L.map('entitymap').setView([40, -10], 3);

                    // Disable dragging functionality if outside of container bounds
                    L.Draggable.prototype._freeze = false;
                    L.Draggable.prototype._updatePosition = function () {
                        if (this._freeze) {
                            return;
                        }

                        this.fire('predrag');
                        L.DomUtil.setPosition(this._element, this._newPos);
                        this.fire('drag');
                    };

                    map.on('mouseout', function () {
                        map.dragging._draggable._freeze = true;
                    });
                    map.on('mouseover', function () {
                        map.dragging._draggable._freeze = false;
                    });
                    // / Disable dragging functionality if outside of container bounds

                    var layer = L.tileLayer('http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png', {
                        maxZoom: 18,
                        minZoom: 2
                    });

                    map.addLayer(layer);
                    map.trackResize = true;
                    L.Icon.Default.imagePath = 'img';

                    var markers = [];

                    var loadMarkers = function () {

                        if (scope.places) {

                            for (var place in scope.places) {

                                var curplace = scope.places[place],
                                    name = curplace.name,
                                    relation = curplace.relation,
                                    location = curplace.location,
                                    title = "";

                                if (relation) title += "<b>" + relation + "</b><br/>";
                                title += "<a href='http://gazetteer.dainst.org/place/" + curplace.gazetteerId
                                    + "' target='_blank'>" + name + "</a>";

                                var text = name,
                                    icon = 'record';
<commit_msg>Hide marker on map if entity location isn't existing (fixes #3536).<commit_after>'use strict';

angular.module('arachne.widgets.map')

/**
 * @author: <NAME>
 */
    .directive('entitymap', [function() {
            return {
                restrict: 'A',
                scope: {
                    places: "="
                },
                link: function (scope, element, attrs) {

                    var map = L.map('entitymap').setView([40, -10], 3);

                    // Disable dragging functionality if outside of container bounds
                    L.Draggable.prototype._freeze = false;
                    L.Draggable.prototype._updatePosition = function () {
                        if (this._freeze) {
                            return;
                        }

                        this.fire('predrag');
                        L.DomUtil.setPosition(this._element, this._newPos);
                        this.fire('drag');
                    };

                    map.on('mouseout', function () {
                        map.dragging._draggable._freeze = true;
                    });
                    map.on('mouseover', function () {
                        map.dragging._draggable._freeze = false;
                    });
                    // / Disable dragging functionality if outside of container bounds

                    var layer = L.tileLayer('http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png', {
                        maxZoom: 18,
                        minZoom: 2
                    });

                    map.addLayer(layer);
                    map.trackResize = true;
                    L.Icon.Default.imagePath = 'img';

                    var markers = [];

                    var loadMarkers = function () {

                        if (scope.places) {

                            for (var place in scope.places) {

                                var curplace = scope.places[place];

                                if (!curplace.location) {
                                    continue;
                                }

                                var name = curplace.name,
                                    relation = curplace.relation,
                                    location = curplace.location,
                                    title = "";

                                if (relation) title += "<b>" + relation + "</b><br/>";
                                title += "<a href='http://gazetteer.dainst.org/place/" + curplace.gazetteerId
                                    + "' target='_blank'>" + name + "</a>";

                                var text = name,
                                    icon = 'record';

{'fraction_non_alphanumeric': 0.1091186570011446, 'fraction_numerical': 0.0038153376573826785, 'mean_word_length': 0.8880086424198775, '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': 28, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3581515', 'n_tokens_mistral': 1276, 'n_tokens_neox': 1133, 'n_words': 232}