PageSourceSearch

https://www.circet.com/_assets/0f3b2fb41ab85a4649203973a472f248/JavaScript/Plugins/maps.js?1718955145

js circet.com collected 2026-09-30 16:41:13 UTC 4,755 bytes, 142 lines download raw bytes

1$(document).on("submit", "#map-filters-form", function (e) {
2    e.preventDefault();
3    $.ajax({
4        url: $(this).attr('action'),
5        type: $(this).attr('method'),
6        data: $(this).serialize(),
7//		dataType: 'json',
8        success: function (response) {
9//            var result = JSON.parse(response);
10            var mapPois = JSON.parse(response['mapPois']);
11            var listPoisUids = JSON.parse(response['listPois']);
12            var listCountriesUids = JSON.parse(response['listCountries']);
13
14            if (mapPois.length !== 0) {
15                // Hide no results message
16                $('.map-no-results').hide();
17
18                // Hide all countries and places
19                $('.country-places .places').hide();
20                $('#countries-list .country').hide();
21
22                $('#aitwContainer').attr("class", "mapActive");
23
24                // Show filtered countries in list
25                $.each(listCountriesUids, function (index, value) {
26                    $('#countries-list #country-' + value + '-list').show();
27                });
28
29                // Show filtered places in list
30                $.each(listPoisUids, function (index, value) {
31                    $('.country-places #place-' + value).show();
32                });
33                // Show filtered places in map
34                //$('#aitwMap').attr('data-pois', mapPois);
35                $('#aitwMap').data('pois', mapPois);
36                initMap(1);
37            } else {
38                // Show no result message
39                $('.map-no-results').show();
40            }
41
42        },
43    });
44});
45
46mapServices = {
47    togglePanel: function (animatable) {
48        var mapAndlistContainer = document.getElementById('aitwMapAndListContainer');
49        var mapContainer = $(mapAndlistContainer).find('#aitwMapContainer');
50        var listContainer = $(mapAndlistContainer).find('#aitwListAndDescriptionContainer');
51
52        if (!mapContainer.hasClass('fullWidth')) {
53            this.changeWidth(mapContainer, "100%", animatable);
54            $(mapContainer).addClass('fullWidth');
55            listContainer.hide();
56
57        } else {
58            this.changeWidth(mapContainer, "70%", animatable);
59            $(mapContainer).removeClass('fullWidth');
60            listContainer.show();
61        }
62    },
63    showPanel: function (element, animatable) {
64
65    },
66
67    hidePanel: function (element, animatable) {
68
69    },
70
71    panelOnLoad: function (animatable) {
72        var mapAndlistContainer = document.getElementById('aitwMapAndListContainer');
73        var mapContainer = $(mapAndlistContainer).find('#aitwMapContainer');
74        var listContainer = $(mapAndlistContainer).find('#aitwListAndDescriptionContainer');
75        if ($('html').hasClass('tablet') || $('html').hasClass('mobile') || $('html').hasClass('rwd-mobile')) {
76            this.changeWidth(mapContainer, "100%", animatable);
77        } else {
78            if (mapContainer.hasClass('fullWidth')) {
79                this.changeWidth(mapContainer, "100%", animatable);
80                listContainer.hide();
81            } else {
82                this.changeWidth(mapContainer, "70%", animatable);
83                listContainer.show();
84            }
85        }
86
87    },
88
89    togglePOIList: function (element, animatable) {
90        identifier = $(element).attr('data-id');
91        //$(element).toggleClass('active');
92        $('#' + identifier + '-places').toggle();
93        $('#' + identifier + '-list').toggleClass('active');
94    },
95
96    hideAllPOIList: function (animatable) {
97        $('#aitwListContainer .country-places').hide();
98
99    },
100
101    changeWidth: function (element, value, animatable) {
102
103        if (animatable) {
104            element.animate({width: value});
105        } else {
106            element.css({'width': value});
107        }
108
109    }
110
111}
112
113
114$(document).ready(function () {
115    mapServices.panelOnLoad(false);
116    $('#showListVisibility').on("click", function () {
117        mapServices.togglePanel(true);
118        resizeMapOnToogle();
119    });
120
121    $('#aitwContainer .country-title').on("click", function () {
122        mapServices.togglePOIList($(this), true);
123    });
124
125    if (!$('#aitwListContainer #countries-list').hasClass('displayAll')) {
126        mapServices.hideAllPOIList(false);
127    }
128
129    $('#aitwMenuContainer .showMap').on("click", function (e) {
130        e.preventDefault();
131        $('#aitwContainer').attr("class", "mapActive");
132    });
133
134    $('#aitwMenuContainer .showFilters').on("click", function (e) {
135        e.preventDefault();
136        $('#aitwContainer').attr("class", "filtersActive");
137    });
138    $('#aitwMenuContainer .showList').on("click", function (e) {
139        e.preventDefault();
140        $('#aitwContainer').attr("class", "listActive");
141    });
142});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.