PageSourceSearch

https://www.patriot-bank.com/includes/lib/js/googleMaps/markerMapv3.js

js patriot-bank.com collected 2026-09-29 12:45:40 UTC 1,489 bytes, 47 lines download raw bytes

1var geocoder;
2var bounds;
3var popup;
4
5var markerMap = function(locations, selector, googleMap) {
6	labels = document.querySelectorAll(selector);
7	
8	geocoder = new google.maps.Geocoder();
9	bounds   = new google.maps.LatLngBounds();
10
11	locations.forEach(function(location, i) {
12		var point  = new google.maps.LatLng(location.latitude, location.longitude);
13		var marker = new google.maps.Marker({position: point, map: googleMap});
14		location.point  = point;
15		location.marker = marker;
16
17		bounds.extend(point);
18		googleMap.fitBounds(bounds);
19
20		if (labels[i] != null) {
21			labels[i].addEventListener("click", function(event) {
22				var contents = '<div class="googleMap-InfoWindow">';
23				contents += '<h2>' + locations[i].name + '</h2>';
24				contents += '<p class="map-address">' + locations[i].address + '</p>';
25
26				if (locations[i].phones) {
27					contents += '<p class="map-phones">';
28					contents += locations[i].phones.join('<br />');
29					contents += '</p>';
30				}
31				contents = contents + '</div>';
32				googleMap.panTo(locations[i].point);
33				if (typeof popup != "undefined")
34				{
35					popup.close();
36				}
37				popup = new google.maps.InfoWindow({map: googleMap, content: contents, anchor: locations[i].marker});
38			});
39
40			// This will 'click' the tab to which the marker refers.
41			google.maps.event.addDomListener(marker, "click", function(e) {
42				var clickEvent = new Event('click', {bubbles: true, cancelable: true});
43				labels[i].dispatchEvent(clickEvent);
44			});
45		}
46	});
47};

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.