PageSourceSearch

https://www.afflelou.es/blog/wp-content/themes/afflelou/assets/js/map.js?ver=7.1

js afflelou.es collected 2026-09-25 15:07:01 UTC 7,307 bytes, 381 lines download raw bytes

1function initMap(mapa) {
2	mapa = mapa || null;
3	var styledMapType = new google.maps.StyledMapType(
4		[
5			{
6				"featureType": "administrative",
7				"elementType": "all",
8				"stylers": [
9					{
10							"lightness": "0"
11					}
12				]
13			},
14			{
15				"featureType": "administrative",
16				"elementType": "geometry",
17				"stylers": [
18					{
19							"lightness": "0"
20					}
21				]
22			},
23			{
24				"featureType": "administrative",
25				"elementType": "geometry.stroke",
26				"stylers": [
27					{
28							"lightness": "0"
29					}
30				]
31			},
32			{
33				"featureType": "administrative",
34				"elementType": "labels",
35				"stylers": [
36					{
37							"lightness": "0"
38					}
39				]
40			},
41			{
42				"featureType": "administrative",
43				"elementType": "labels.text.fill",
44				"stylers": [
45					{
46							"color": "#444444"
47					}
48				]
49			},
50			{
51				"featureType": "administrative.province",
52				"elementType": "labels",
53				"stylers": [
54					{
55							"lightness": "40"
56					}
57				]
58			},
59			{
60				"featureType": "administrative.locality",
61				"elementType": "labels",
62				"stylers": [
63					{
64							"lightness": "25"
65					}
66				]
67			},
68			{
69				"featureType": "administrative.neighborhood",
70				"elementType": "labels",
71				"stylers": [
72					{
73							"lightness": "40"
74					},
75					{
76							"visibility": "off"
77					}
78				]
79			},
80			{
81				"featureType": "landscape",
82				"elementType": "all",
83				"stylers": [
84					{
85							"color": "#f2f2f2"
86					}
87				]
88			},
89			{
90				"featureType": "landscape.man_made",
91				"elementType": "all",
92				"stylers": [
93					{
94							"lightness": "100"
95					}
96				]
97			},
98			{
99				"featureType": "landscape.natural",
100				"elementType": "all",
101				"stylers": [
102					{
103							"lightness": "0"
104					},
105					{
106							"color": "#ffffff"
107					}
108				]
109			},
110			{
111				"featureType": "landscape.natural.landcover",
112				"elementType": "all",
113				"stylers": [
114					{
115							"lightness": "0"
116					}
117				]
118			},
119			{
120				"featureType": "landscape.natural.landcover",
121				"elementType": "geometry.fill",
122				"stylers": [
123					{
124							"lightness": "0"
125					},
126					{
127							"saturation": "0"
128					}
129				]
130			},
131			{
132				"featureType": "poi",
133				"elementType": "all",
134				"stylers": [
135					{
136							"visibility": "off"
137					}
138				]
139			},
140			{
141				"featureType": "poi.park",
142				"elementType": "all",
143				"stylers": [
144					{
145							"lightness": "27"
146					},
147					{
148							"visibility": "on"
149					}
150				]
151			},
152			{
153				"featureType": "poi.park",
154				"elementType": "geometry.fill",
155				"stylers": [
156					{
157							"color": "#e5f2e6"
158					},
159					{
160							"saturation": "1"
161					},
162					{
163							"lightness": "0"
164					},
165					{
166							"gamma": "1"
167					}
168				]
169			},
170			{
171				"featureType": "poi.park",
172				"elementType": "labels",
173				"stylers": [
174					{
175							"visibility": "off"
176					}
177				]
178			},
179			{
180				"featureType": "road",
181				"elementType": "all",
182				"stylers": [
183					{
184							"saturation": -100
185					},
186					{
187							"lightness": "45"
188					}
189				]
190			},
191			{
192				"featureType": "road",
193				"elementType": "geometry.stroke",
194				"stylers": [
195					{
196							"lightness": "-5"
197					}
198				]
199			},
200			{
201				"featureType": "road.highway",
202				"elementType": "all",
203				"stylers": [
204					{
205							"visibility": "simplified"
206					}
207				]
208			},
209			{
210				"featureType": "road.highway",
211				"elementType": "geometry.fill",
212				"stylers": [
213					{
214							"lightness": "-5"
215					}
216				]
217			},
218			{
219				"featureType": "road.highway",
220				"elementType": "geometry.stroke",
221				"stylers": [
222					{
223							"lightness": "0"
224					}
225				]
226			},
227			{
228				"featureType": "road.arterial",
229				"elementType": "geometry.fill",
230				"stylers": [
231					{
232							"lightness": "-10"
233					},
234					{
235							"weight": "1.00"
236					}
237				]
238			},
239			{
240				"featureType": "road.arterial",
241				"elementType": "geometry.stroke",
242				"stylers": [
243					{
244							"lightness": "0"
245					},
246					{
247							"saturation": "0"
248					}
249				]
250			},
251			{
252				"featureType": "road.arterial",
253				"elementType": "labels.icon",
254				"stylers": [
255					{
256							"visibility": "off"
257					}
258				]
259			},
260			{
261				"featureType": "road.local",
262				"elementType": "geometry.fill",
263				"stylers": [
264					{
265							"saturation": "0"
266					},
267					{
268							"lightness": "-7"
269					}
270				]
271			},
272			{
273				"featureType": "transit",
274				"elementType": "all",
275				"stylers": [
276					{
277							"visibility": "off"
278					}
279				]
280			},
281			{
282				"featureType": "water",
283				"elementType": "all",
284				"stylers": [
285					{
286							"color": "#afdbed"
287					},
288					{
289							"visibility": "on"
290					},
291					{
292							"lightness": "40"
293					}
294				]
295			},
296			{
297				"featureType": "water",
298				"elementType": "geometry.fill",
299				"stylers": [
300					{
301							"saturation": "0"
302					},
303					{
304							"lightness": "0"
305					}
306				]
307			}
308	], {name: 'Styled Map'});
309	var spain = {lat: 40.6489672, lng: -8.55306};
310	var map = new google.maps.Map(document.getElementById('map'), {
311		center: spain,
312		disableDefaultUI: true,
313		zoom: 6
314	});
315
316	var iconBase = '../../plugins/store-map-locations/img/';
317	var icons = {
318		free: {
319			icon: iconBase + 'libre.png'
320		},
321		reserved: {
322			icon: iconBase + 'reservado.png'
323		}
324	};
325
326	var features = [];
327	var els = document.getElementsByClassName('store');
328	[].forEach.call(els, function(el) {
329		var lon = parseFloat(el.getElementsByClassName('lon')[0].innerText);
330		var lat = parseFloat(el.getElementsByClassName('lat')[0].innerText);
331		features.push({
332			lon: lon,
333			lat: lat,
334			marker: el.getElementsByClassName('avail')[0].innerText,
335			title: el.getElementsByClassName('name')[0].innerText,
336			type: el.getElementsByClassName('name')[0].innerText
337		});
338	});
339	features.forEach(function(feature) {
340		var ic = '';
341		if(feature['marker'] == 1) {
342			ic = '' + templateDir + 'assets/img/libre.png';
343		} else {
344			ic = '' + templateDir + 'assets/img/reservado.png'
345		}
346		var marker = new google.maps.Marker({
347			position: new google.maps.LatLng(feature.lat, feature.lon),
348			icon: ic,
349			map: map,
350			title: feature.title
351		});
352		marker.addListener('mouseover', function() {
353			var tit = marker.title;
354			jQuery('#list ul li .name').each(function(index, value) {
355				if(jQuery(value).text() == tit) {
356					jQuery('.gmnoprint[title="' + jQuery(value).text() + '"]').addClass('highlighted');
357					jQuery(this).parent().addClass('highlighted');
358				}
359			});
360		});
361		marker.addListener('mouseout', function() {
362			var tit = marker.title;
363			jQuery('#list ul li .name').each(function(index, value) {
364				if(jQuery(value).text() == tit) {
365					jQuery('.gmnoprint[title="' + jQuery(value).text() + '"]').removeClass('highlighted');
366					jQuery(this).parent().removeClass('highlighted');
367				}
368			});
369		});
370	});
371
372	map.mapTypes.set('styled_map', styledMapType);
373	map.setMapTypeId('styled_map');
374	features.forEach(function(feature) {
375		if(feature['title'] == mapa) {
376			var point = {lat: feature['lat'], lng: feature['lon']};
377			map.setCenter(new google.maps.LatLng(point));
378			map.setZoom(14);
379		}
380	});
381}

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.