PageSourceSearch

https://gillshvacr.com/Scripts/Templates/googleMapsMultiLocation.js

js gillshvacr.com collected 2026-09-29 17:15:40 UTC 1,995 bytes, 54 lines download raw bytes

1var lat = '';
2var lng = '';
3var mapCenter;
4var areas;
5
6//https://medium.com/@limichelle21/integrating-google-maps-api-for-multiple-locations-a4329517977a
7function initMap() {
8    geocoder = new google.maps.Geocoder();
9    geocoder.geocode({
10        'address': $('#smallmapaddress').text()
11    }, function (results, status) {
12        if (status == google.maps.GeocoderStatus.OK) {
13            mapCenter = results[0].geometry.location;
14            if (geocode != null && geocode.length > 0) {
15                var map = new google.maps.Map(document.getElementById('gmMultiLocation'), {
16                    zoom: 10,
17                    center: mapCenter
18                });
19
20                var infowindow = new google.maps.InfoWindow({});
21
22                var marker, count;
23
24                for (var i = 0; i < geocode.length; i++) {
25                    pos = geocode[i].map_coordinates;
26                    if (!pos || pos.trim() === '') continue;
27                    element = geocode[i].lookup_title;
28                    var coord = pos.split(",");
29                    lat = parseFloat(coord[0]);
30                    lng = parseFloat(coord[1]);
31                    if (isNaN(lat) || isNaN(lng)) continue;
32                    marker = new google.maps.Marker({
33                        position: new google.maps.LatLng(lat, lng),
34                        map: map,
35                        title: element
36                    });
37
38                    google.maps.event.addListener(marker, 'click', (function (marker) {
39                        return function () {
40                            infowindow.setContent(marker.title);
41                            infowindow.open(map, marker);
42                        }
43                    })(marker));
44                }
45            }
46            else {
47                $("#gmMultiLocation").hide();
48            }
49        }
50        else {
51            $("#gmMultiLocation").hide();
52        }
53    });
54}

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.