PageSourceSearch

https://cafedecolombia.jp/scripts/pi.init.map.js

js cafedecolombia.jp collected 2026-10-02 23:36:44 UTC 3,183 bytes, 135 lines download raw bytes

1/* Aura version: 1.8.5 */
2
3jQuery(function($){
4
5	//region Google Map
6	if($.fn.gMap){
7		$('.pi-google-map').each(function (i) {
8			var $map = $(this),
9				markers = [],
10				type = $map.data('mapType') || 'roadmap',
11				zoom = $map.data('mapZoom') || 14,
12				style = $map.data('mapStyle') || [],
13				scrollwheel = $map.data('mapScrollWheel') || 0,
14				markerImg = $map.data('mapMarker') || '',
15				markerImgSize = $map.data('mapMarkerSize') || [],
16				markerAnchor = $map.data('mapMarkerAnchor') || [];
17
18			if(markerImg) {
19
20				if(markerImgSize.length > 1){
21					markerImgSize = markerImgSize.split(',');
22					markerImgSize[0] = parseInt(markerImgSize[0], 10);
23					markerImgSize[1] = parseInt(markerImgSize[1], 10);
24				}
25
26				if(markerAnchor.length > 1){
27					markerAnchor = markerAnchor.split(',');
28					markerAnchor[0] = parseInt(markerAnchor[0], 10);
29					markerAnchor[1] = parseInt(markerAnchor[1], 10);
30				}
31
32			}
33
34			buildMarkers();
35
36			function buildMarkers(){
37
38				var data = $map.data(),
39					dataArray = [],
40					addresses = [],
41					titles = [],
42					coords = [];
43
44				for(var prop in data){
45					if (data.hasOwnProperty(prop)) {
46						dataArray[prop] = data[prop];
47					}
48				}
49
50				for(var prop2 in dataArray){
51					if (dataArray.hasOwnProperty(prop2)) {
52						if(~prop2.indexOf('mapAddress')){
53							addresses.push(dataArray[prop2]);
54						} else if(~prop2.indexOf('mapCoords')){
55							var c = dataArray[prop2].split(';');
56							if(c.length > 1){
57								coords.push({
58									latitude: c[0],
59									longitude: c[1]
60								});
61							}
62						} else if(~prop2.indexOf('mapTitle')){
63							titles.push(dataArray[prop2]);
64						}
65					}
66				}
67
68				for(var i = addresses.length - 1; i >= 0; i--){
69					var marker = {
70						address: addresses[i] ? addresses[i] : '',
71						title: titles[i] ? titles[i] : ''
72					};
73
74					if(markerImg){
75						marker.icon = {
76							image: markerImg,
77							iconsize: markerImgSize,
78							iconanchor: markerAnchor
79						}
80					}
81
82					markers.push(marker);
83				}
84
85				for(var j = coords.length - 1; j >= 0; j--){
86					var marker2 = {
87						latitude: coords[j] ? coords[j].latitude : '',
88						longitude: coords[j] ? coords[j].longitude : '',
89						title: titles[j] ? titles[j] : ''
90					};
91
92					if(markerImg){
93						marker2.icon = {
94							image: markerImg,
95							iconsize: markerImgSize,
96							iconanchor: markerAnchor
97						}
98					}
99
100					markers.push(marker2);
101				}
102
103			}
104
105			if(style && window['googleMapStyle_' + style] && window['googleMapStyle_' + style].length){
106				style = window['googleMapStyle_' + style];
107			}
108
109
110			if(markers[0].address){
111				$map.gMap({
112					maptype: type,
113					address: markers[0].address,
114					zoom: zoom,
115					styles: style,
116					scrollwheel: scrollwheel,
117					markers: markers
118				});
119			} else if(markers[0].latitude) {
120				$map.gMap({
121					maptype: type,
122					latitude: markers[0].latitude,
123					longitude: markers[0].longitude,
124					zoom: zoom,
125					styles: style,
126					scrollwheel: scrollwheel,
127					markers: markers
128				});
129			}
130
131		});
132	}
133	//endregion
134
135});

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.