<commit_before>/**
 * Created by artem on 10/7/15.
 */
/*global google*/
(function (google, angular) {
    'use strict';
    angular.module('LogicifyGMap')
        .directive('xmlOverlays', [
            '$timeout',
            '$log',
            '$q',
            '$compile',
            '$http',
            'SmartCollection',
            function ($timeout, $log, $q, $compile, $http, SmartCollection) {
                return {
                    restrict: 'E',
                    require: '^logicifyGmap',
                    scope: {
                        kmlCollection: '=kmlCollection',
                        gmapEvents: '&gmapEvents',
                        parserOptions: '&parserOptions',
                        onProgress: '&onProgress',
                        fitAllLayers: '&fitAllLayers',
                        'infoWindow': '=infoWindow'
                    },
                    link: function (scope, element, attrs, ctrl) {
                        var geoXml3Parser = null;
                        scope.kmlCollection = new SmartCollection(scope.kmlCollection);
                        var currentCollectionPrefix = scope.kmlCollection._uid;
                        scope.events = scope.gmapEvents() || {};
                        scope.parserOptions = scope.parserOptions() || {};
                        scope.onProgress = scope.onProgress();
                        scope.fitBoundsAfterAll = scope.fitAllLayers(); //true by default
                        scope.infowindow = scope.infoWindow;
                        var promises = [], PROMISE_STATUSES = {PENDING: 0, RESOLVED: 1, REJECTED: 2};

                        function getParserOptions(map, wnd) {
                            var opts = {};
                            angular.extend(opts, scope.parserOptions);
                            //override options
                            opts.map = map;
                            opts.afterParse = afterParse;
                            opts.onAfterCreateGroundOverlay = scope.events.onAfterCreateGroundOverlay;<commit_msg>check if geoXML3 is loaded<commit_after>/**
 * Created by artem on 10/7/15.
 */
/*global google*/
(function (google, angular) {
    'use strict';
    angular.module('LogicifyGMap')
        .directive('xmlOverlays', [
            '$timeout',
            '$log',
            '$q',
            '$compile',
            '$http',
            'SmartCollection',
            function ($timeout, $log, $q, $compile, $http, SmartCollection) {
                return {
                    restrict: 'E',
                    require: '^logicifyGmap',
                    scope: {
                        kmlCollection: '=kmlCollection',
                        gmapEvents: '&gmapEvents',
                        parserOptions: '&parserOptions',
                        onProgress: '&onProgress',
                        fitAllLayers: '&fitAllLayers',
                        'infoWindow': '=infoWindow'
                    },
                    link: function (scope, element, attrs, ctrl) {
                        if (!geoXML3) {
                            throw new Error('You should include geoxml3.js to be able to parse xml overlays. Please check that geoxml3.js file loads before logicify-gmap.js');
                        }
                        var geoXml3Parser = null;
                        scope.kmlCollection = new SmartCollection(scope.kmlCollection);
                        var currentCollectionPrefix = scope.kmlCollection._uid;
                        scope.events = scope.gmapEvents() || {};
                        scope.parserOptions = scope.parserOptions() || {};
                        scope.onProgress = scope.onProgress();
                        scope.fitBoundsAfterAll = scope.fitAllLayers(); //true by default
                        scope.infowindow = scope.infoWindow;
                        var promises = [], PROMISE_STATUSES = {PENDING: 0, RESOLVED: 1, REJECTED: 2};

                        function getParserOptions(map, wnd) {
                            var opts = {};
                            angular.extend(opts, scope.parserOptions);
                            //override options
                            opts.map = map;
                            opts.afterParse = afterParse;
                            opts.onAfterCreateGroundOverlay = scope.events.onAfterCreateGroundOverlay;
{'fraction_non_alphanumeric': 0.10034129692832765, 'fraction_numerical': 0.005005688282138794, 'mean_word_length': 1.2258227848101266, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 5}, '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': '7527512', 'n_tokens_mistral': 1069, 'n_tokens_neox': 1004, 'n_words': 222}