PageSourceSearch

https://booking.studentdepot.pl/master/js/modules/maps/gmap.js

js studentdepot.pl collected 2026-10-04 12:58:28 UTC 3,508 bytes, 82 lines download raw bytes

1/**=========================================================
2 * Module: gmap.js
3 * Init Google Map plugin
4 =========================================================*/
5
6(function() {
7    'use strict';
8
9    $(initGoogleMaps);
10
11    // -------------------------
12    // Map Style definition
13    // -------------------------
14    // Get more styles from http://snazzymaps.com/style/29/light-monochrome
15    // - Just replace and assign to 'MapStyles' the new style array
16    var MapStyles = [{ featureType: 'water', stylers: [{ visibility: 'on' }, { color: '#bdd1f9' }] }, { featureType: 'all', elementType: 'labels.text.fill', stylers: [{ color: '#334165' }] }, { featureType: 'landscape', stylers: [{ color: '#e9ebf1' }] }, { featureType: 'road.highway', elementType: 'geometry', stylers: [{ color: '#c5c6c6' }] }, { featureType: 'road.arterial', elementType: 'geometry', stylers: [{ color: '#fff' }] }, { featureType: 'road.local', elementType: 'geometry', stylers: [{ color: '#fff' }] }, { featureType: 'transit', elementType: 'geometry', stylers: [{ color: '#d8dbe0' }] }, { featureType: 'poi', elementType: 'geometry', stylers: [{ color: '#cfd5e0' }] }, { featureType: 'administrative', stylers: [{ visibility: 'on' }, { lightness: 33 }] }, { featureType: 'poi.park', elementType: 'labels', stylers: [{ visibility: 'on' }, { lightness: 20 }] }, { featureType: 'road', stylers: [{ color: '#d8dbe0', lightness: 20 }] }];
17
18
19    function initGoogleMaps() {
20
21        if (!$.fn.gMap) return;
22
23        var mapSelector = '[data-gmap]';
24        var gMapRefs = [];
25
26        $(mapSelector).each(function() {
27
28            var $this = $(this),
29                addresses = $this.data('address') && $this.data('address').split(';'),
30                titles = $this.data('title') && $this.data('title').split(';'),
31                zoom = $this.data('zoom') || 14,
32                maptype = $this.data('maptype') || 'ROADMAP', // or 'TERRAIN'
33                markers = [];
34
35            if (addresses) {
36                for (var a in addresses) {
37                    if (typeof addresses[a] == 'string') {
38                        markers.push({
39                            address: addresses[a],
40                            html: (titles && titles[a]) || '',
41                            popup: true /* Always popup */
42                        });
43                    }
44                }
45
46                var options = {
47                    controls: {
48                        panControl: true,
49                        zoomControl: true,
50                        mapTypeControl: true,
51                        scaleControl: true,
52                        streetViewControl: true,
53                        overviewMapControl: true
54                    },
55                    scrollwheel: false,
56                    maptype: maptype,
57                    markers: markers,
58                    zoom: zoom
59                    // More options https://github.com/marioestrada/jQuery-gMap
60                };
61
62                var gMap = $this.gMap(options);
63
64                var ref = gMap.data('gMap.reference');
65                // save in the map references list
66                gMapRefs.push(ref);
67
68                // set the styles
69                if ($this.data('styled') !== undefined) {
70
71                    ref.setOptions({
72                        styles: MapStyles
73                    });
74
75                }
76            }
77
78        }); //each
79
80    }
81
82})();

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.