PageSourceSearch

https://sportcesped.com/assets/js/map-helper.js

js sportcesped.com collected 2026-10-02 14:27:35 UTC 3,870 bytes, 159 lines download raw bytes

1
2// 7. google map
3function gMap () {
4	if ($('.google-map').length) {
5        $('.google-map').each(function () {
6        	// getting options from html
7        	var Self = $(this); 
8        	var mapName = Self.attr('id');
9        	var mapLat = Self.data('map-lat');
10        	var mapLng = Self.data('map-lng');
11        	var iconPath = Self.data('icon-path');
12        	var mapZoom = Self.data('map-zoom');
13        	var mapTitle = Self.data('map-title');
14        	var markers = Self.data('markers');
15
16        	// defined default style
17        	var styles = [
18			    {
19			        "featureType": "administrative",
20			        "elementType": "labels.text.fill",
21			        "stylers": [
22			            {
23			                "color": "#222222"
24			            }
25			        ]
26			    },
27			    {
28			        "featureType": "landscape",
29			        "elementType": "all",
30			        "stylers": [
31			            {
32			                "color": "#f8f4e8"
33			            }
34			        ]
35			    },
36			    {
37			        "featureType": "poi",
38			        "elementType": "all",
39			        "stylers": [
40			            {
41			                "visibility": "off"
42			            }
43			        ]
44			    },
45			    {
46			        "featureType": "road",
47			        "elementType": "all",
48			        "stylers": [
49			            {
50			                "saturation": -100
51			            },
52                        {
53			                "color": "#ffffff"
54			            },
55			            {
56			                "lightness": 45
57			            }
58			        ]
59			    },
60			    {
61			        "featureType": "road.highway",
62			        "elementType": "all",
63			        "stylers": [
64                        {
65			                "color": "#f2f2f2"
66			            },
67			            {
68			                "visibility": "simplified"
69			            }
70			            
71			        ]
72			    },
73			    {
74			        "featureType": "road.arterial",
75			        "elementType": "labels.icon",
76			        "stylers": [
77			            {
78			                "visibility": "off"
79			            }
80			        ]
81			    },
82			    {
83			        "featureType": "transit",
84			        "elementType": "all",
85			        "stylers": [
86			            {
87			                "visibility": "off"
88			            }
89			        ]
90			    },
91			    {
92			        "featureType": "water",
93			        "elementType": "all",
94			        "stylers": [
95			            {
96			                "color": "#abd0fa"
97			            },
98			            {
99			                "visibility": "on"
100			            }
101			        ]
102			    }
103			];
104
105        	// if zoom not defined the zoom value will be 15;
106        	if (mapZoom) {
107        		var mapZoom = 6;
108        	};
109        	// init map
110        	var map;
111            map = new GMaps({
112                div: '#'+mapName,
113                scrollwheel: false,
114                lat: mapLat,
115                lng: mapLng,
116                styles: styles,
117                zoom: mapZoom
118            });
119            // if icon path setted then show marker
120            if(iconPath) {
121                $.each(markers, function (index, value) {
122                    var index = value;
123                    var html;
124                    if (index[2]) {
125                        html = index[2];
126                    };                    
127                    if (!index[3]) {
128                        index[3] = iconPath;
129                    };
130            
131                    map.addMarker({
132                        icon: index[3],                        
133                        lat: index[0],
134                        lng: index[1],
135                        infoWindow: {
136                          content: html
137                        }
138                    });   
139
140                });
141        	}
142        });  
143	};
144}
145
146
147
148// Instance of fuction while Document ready event	
149jQuery(document).ready(function () {
150	(function ($) {
151		gMap();
152        
153        
154	})(jQuery);
155});
156
157
158
159

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.