PageSourceSearch

https://www.hoffmaninstitute.ca/wp-content/themes/psychare/assets/js/slcr-map.js?ver=7.1.2

js hoffmaninstitute.ca collected 2026-10-04 14:11:33 UTC 12,191 bytes, 453 lines download raw bytes

1function initMap() {
2    "use strict"; 
3    jQuery(document).ready(function($) { 
4    	$(".slcr-google-map").each(function() { 
5	    	var mapid = this.id;  
6	    	var custom_water_color_map = $('#'+mapid).attr('data-slcr-custom-water-color');
7	    	var custom_landscape_color_map = $('#'+mapid).attr('data-slcr-custom-landscape-color');
8	    	var custom_highway_color_map = $('#'+mapid).attr('data-slcr-custom-highway-color');
9	    	var custom_poi_color_map = $('#'+mapid).attr('data-slcr-custom-poi-color');
10	    	var custom_labels_text_stroke_map = $('#'+mapid).attr('data-slcr-custom-labels-text-stroke');
11	    	var custom_geometry_on_off_map = $('#'+mapid).attr('data-slcr-custom-geometry-on-off'); 
12	    	if(custom_water_color_map =="null") {
13	    		custom_water_color_map="#000000";
14	    	}
15	    	if(custom_landscape_color_map =="null") {
16	    		custom_landscape_color_map="#000000";
17	    	}
18	    	if(custom_highway_color_map =="null") {
19	    		custom_highway_color_map="#000000";
20	    	}
21	    	if(custom_poi_color_map =="null") {
22	    		custom_poi_color_map="#000000";
23    		}
24    	var MapDark = new google.maps.StyledMapType(
25        [
26        {
27            "featureType": "all",
28            "elementType": "labels.text.fill",
29            "stylers": [
30            	{
31            		"visibility": custom_labels_text_stroke_map
32            	},
33                {
34                    "saturation": 36
35                },
36                {
37                    "color": "#000000"
38                },
39                {
40                    "lightness": 40
41                }
42            ]
43        },
44        {
45            "featureType": "all",
46            "elementType": "labels.text.stroke",
47            "stylers": [
48                {
49                    "visibility": "off"
50                },
51                {
52                    "color": "#000000"
53                },
54                {
55                    "lightness": 16
56                }
57            ]
58        },
59        {
60            "featureType": "all",
61            "elementType": "labels.icon",
62            "stylers": [
63                {
64                    "visibility": "off"
65                }
66            ]
67        },
68        {
69            "featureType": "administrative",
70            "elementType": "geometry.fill",
71            "stylers": [
72                {
73                    "color": "#000000"
74                },
75                {
76                    "lightness": 20
77                }
78            ]
79        },
80        {
81            "featureType": "administrative",
82            "elementType": "geometry.stroke",
83            "stylers": [
84                {
85                    "color": "#000000"
86                },
87                {
88                    "lightness": 17
89                },
90                {
91                    "weight": 1.2
92                }
93            ]
94        },
95        {
96            "featureType": "landscape",
97            "elementType": "geometry",
98            "stylers": [
99                {
100                    "color": custom_landscape_color_map
101                },
102                {
103                    "lightness": 20
104                }
105            ]
106        },
107        {
108            "featureType": "poi",
109            "elementType": "geometry",
110            "stylers": [
111                {
112                    "color": custom_poi_color_map
113                },
114                {
115                    "lightness": 21
116                }
117            ]
118        },
119        {
120            "featureType": "road.highway",
121            "elementType": "geometry.fill",
122            "stylers": [
123                {
124                    "color": custom_highway_color_map
125                },
126                {
127                    "lightness": 17
128                }
129            ]
130        },
131        {
132            "featureType": "road.highway",
133            "elementType": "geometry.stroke",
134            "stylers": [
135                {
136                    "color": custom_highway_color_map
137                },
138                {
139                    "lightness": 29
140                },
141                {
142                    "weight": 0.2
143                }
144            ]
145        },
146        {
147            "featureType": "road.arterial",
148            "elementType": "geometry",
149            "stylers": [
150                {
151                    "color": "#000000"
152                },
153                {
154                    "lightness": 18
155                }
156            ]
157        },
158        {
159            "featureType": "road.local",
160            "elementType": "geometry",
161            "stylers": [
162                {
163                    "color": "#000000"
164                },
165                {
166                    "lightness": 16
167                }
168            ]
169        },
170        {
171            "featureType": "transit",
172            "elementType": "geometry",
173            "stylers": [
174            	{
175                    "visibility": custom_geometry_on_off_map
176                },
177                {
178                    "color": "#000000"
179                },
180                {
181                    "lightness": 19
182                }
183            ]
184        },
185        {
186            "featureType": "water",
187            "elementType": "geometry",
188            "stylers": [
189                {
190                    "color": custom_water_color_map
191                },
192                {
193                    "lightness": 17
194                }
195            ]
196        }
197    ],
198     {
199        name: 'Dark'
200    });
201	
202	var custom_water_color_map = $('#'+mapid).attr('data-slcr-custom-water-color');
203	var custom_landscape_color_map = $('#'+mapid).attr('data-slcr-custom-landscape-color');
204	var custom_highway_color_map = $('#'+mapid).attr('data-slcr-custom-highway-color');
205	var custom_poi_color_map = $('#'+mapid).attr('data-slcr-custom-poi-color');
206	var custom_labels_text_stroke_map = $('#'+mapid).attr('data-slcr-custom-labels-text-stroke');
207	var custom_geometry_on_off_map = $('#'+mapid).attr('data-slcr-custom-geometry-on-off');
208	if(custom_water_color_map =="null"){
209		custom_water_color_map="#6DC0D5";
210	}  
211	if(custom_landscape_color_map =="null"){
212		custom_landscape_color_map="#ffffff";
213	}
214	if(custom_highway_color_map =="null"){
215		custom_highway_color_map="#eeeeee";
216	}
217	if(custom_poi_color_map =="null"){
218		custom_poi_color_map="#f1f1f1";
219	}
220    var MapLight = new google.maps.StyledMapType(
221    [
222        {
223            "featureType": "water",
224            "elementType": "geometry",
225            "stylers": [
226                {
227                    "color": custom_water_color_map
228                },
229                {
230                    "lightness": 17
231                }
232            ]
233        },
234        {
235            "featureType": "landscape",
236            "elementType": "geometry",
237            "stylers": [
238                {
239                    "color": custom_landscape_color_map
240                },
241                {
242                    "lightness": 20
243                }
244            ]
245        },
246        {
247            "featureType": "road.highway",
248            "elementType": "geometry.fill",
249            "stylers": [
250                {
251                    "color": custom_highway_color_map
252                },
253                {
254                    "lightness": 0
255                }
256            ]
257        },
258        {
259            "featureType": "road.highway",
260            "elementType": "geometry.stroke",
261            "stylers": [
262                {
263                    "color": custom_highway_color_map
264                },
265                {
266                    "lightness": 29
267                },
268                {
269                    "weight": 1
270                }
271            ]
272        },
273        {
274            "featureType": "road.arterial",
275            "elementType": "geometry",
276            "stylers": [
277                {
278                    "color": "#eeeeee"
279                },
280                {
281                    "lightness": 29
282                },
283                {
284                    "weight": 1
285                }
286            ]
287        },
288        {
289            "featureType": "road.local",
290            "elementType": "geometry",
291            "stylers": [
292                {
293                    "color": "#eeeeee"
294                },
295                {
296                    "lightness": 50
297                },
298                {
299                    "weight": 0.5
300                }
301            ]
302        },
303        {
304            "featureType": "poi",
305            "elementType": "geometry",
306            "stylers": [
307                {
308                    "color": custom_poi_color_map
309                },
310                {
311                    "lightness": 21
312                }
313            ]
314        },
315        {
316            "elementType": "labels.text.stroke",
317            "stylers": [
318                {
319                    "visibility": "off"
320                },
321                {
322                    "color": "#ffffff"
323                },
324                {
325                    "lightness": 16
326                }
327            ]
328        },
329        {
330            "elementType": "labels.text.fill",
331            "stylers": [
332                {
333                    "visibility": custom_labels_text_stroke_map
334                }
335            ]
336        },
337        {
338            "elementType": "labels.icon",
339            "stylers": [
340                {
341                    "visibility": "off"
342                }
343            ]
344        },
345        {
346            "featureType": "transit",
347            "elementType": "geometry",
348            "stylers": [
349                {
350                    "visibility": custom_geometry_on_off_map
351                }
352            ]
353        },
354        {
355            "featureType": "administrative",
356            "elementType": "geometry.fill",
357            "stylers": [
358                {
359                    "color": "#fefefe"
360                },
361                {
362                    "lightness": 20
363                }
364            ]
365        },
366        {
367            "featureType": "administrative",
368            "elementType": "geometry.stroke",
369            "stylers": [
370                {
371                    "color": "#fefefe"
372                },
373                {
374                    "lightness": 17
375                },
376                {
377                    "weight": 1.2
378                }
379            ]
380        }
381    ],
382     {
383        name: 'Light Blue'
384    });
385   
386
387    	
388     
389    
390    var map_zoom = parseFloat($('#'+mapid).attr('data-map-zoom'));
391    var center_lat = $('#'+mapid).attr('data-center-lat');
392    var center_long = $('#'+mapid).attr('data-center-long');
393
394    
395    var center = new google.maps.LatLng(center_lat, center_long);
396    
397    // Map Controls
398    var map = new google.maps.Map(document.getElementById(mapid), {
399        center: center,
400        zoom: map_zoom,
401        cursor: false,
402        mapTypeControl: false,
403        scrollwheel: false,
404        zoomControl: true,
405          zoomControlOptions: {
406              position: google.maps.ControlPosition.LEFT_CENTER
407          },
408        scaleControl: false
409    });
410    
411    var marker_locations = $('#'+mapid).attr('data-map-marker-locations'); 
412    if(marker_locations == ""){
413
414    }else {
415    	var numbers_marker_locations = marker_locations.split('|');
416    	jQuery.each( numbers_marker_locations, function( i, val ) { 
417	  	var position = val.split(',');  
418	  	var position1 = parseFloat(position[0]);
419	  	var position2 = parseFloat(position[1]); 
420	  	var set_position = {lat: position1, lng: position2}; 
421	  	 // Map Marker 1
422	  	var custom_marker = $('#'+mapid).attr('data-custom-marker');
423	  	if(custom_marker == "false"){
424	  		var marker = new google.maps.Marker({
425	      	position: set_position,
426	     	map: map
427	     	  });	
428	  	}else {
429		  	var marker = new google.maps.Marker({
430	      	position: set_position,
431	     	map: map,
432	     	icon: $('#'+mapid).attr('data-custom-marker')
433	     	  });	
434	  	}
435  
436    
437	});
438    }
439   
440   
441    var custom_map_style = $('#'+mapid).attr('data-slcr-google-map-style');
442    if(custom_map_style == "light"){
443    	map.mapTypes.set('styled_map', MapLight);
444    	map.setMapTypeId('styled_map');
445    }else if(custom_map_style == "dark"){
446    	map.mapTypes.set('styled_map', MapDark);
447    	map.setMapTypeId('styled_map');
448    } 
449    
450    });
451
452    });
453}

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.