PageSourceSearch

https://www.atlanticvacationhomes.com/wp-content/themes/altitude-p…/vrp.resultListMap.js?ver=7.0.5.1790407938

js atlanticvacationhomes.com collected 2026-09-26 08:49:06 UTC 7,282 bytes, 196 lines download raw bytes

1let map, bounds, markers = [];
2(function ($, global, undefined) {
3
4    var marker;
5    var geocoder = new google.maps.Geocoder();
6    bounds = new google.maps.LatLngBounds();
7    var infowindow = new google.maps.InfoWindow();
8
9    function initializeResultListMap() {
10        var myOptions = {
11            zoom: 14,
12            scrollwheel: false,
13            mapTypeId: google.maps.MapTypeId.ROADMAP,
14            streetViewControl: false,
15            styles: [
16                {
17                  "featureType": "poi.business",
18                  "stylers": [
19                    {
20                      "visibility": "off"
21                    }
22                  ]
23                },
24                {
25                  "featureType": "poi.park",
26                  "elementType": "labels.text",
27                  "stylers": [
28                    {
29                      "visibility": "off"
30                    }
31                  ]
32                }
33              ]
34        };
35
36        map = new google.maps.Map(document.getElementById("abe-map-results"), myOptions);
37    }
38
39    function mapAddress(address,unitInfo) {
40        geocoder.geocode({'address': address}, function (results, status) {
41            if (status == google.maps.GeocoderStatus.OK) {
42                bounds.extend(results[0].geometry.location);
43                //map.setCenter(results[0].geometry.location);
44
45            marker = new google.maps.Marker({
46                map: map,
47                position: results[0].geometry.location
48            });
49
50            map.fitBounds(bounds);
51
52            google.maps.event.addListener(marker, 'click', (function (marker) {
53                return function () {
54                    infowindow.setContent(unitInfo);
55                    infowindow.open(map, marker);
56                }
57            })(marker));
58            } else {
59                console.log('Internal error: ' + status + address)
60
61
62            }
63        });
64    }
65
66    function mapAddressL(Lat, Long, address, unitInfo) {
67        marker = new google.maps.Marker({
68            map: map,
69            position: new google.maps.LatLng(Lat, Long)
70        });
71
72        bounds.extend(marker.position);
73        map.fitBounds(bounds);
74
75        google.maps.event.addListener(marker, 'click', (function (marker) {
76            return function () {
77                infowindow.setContent(unitInfo);
78                infowindow.open(map, marker);
79            }
80        })(marker));
81    }
82
83    $(document).ready(function () {
84        var vrpUnits = $('.abe-item');
85
86if(vrpUnits.length > 0) {
87
88    initializeResultListMap();
89
90    function normalIcon() {
91        return {
92          url: url_paths.stylesheet_dir_url + '/vrp/images/ico-pin.png'
93        };
94    }
95    
96    function highlightedIcon() {
97        return {
98          url: url_paths.stylesheet_dir_url + '/vrp/images/ico-pin-2.png'
99        };
100    }
101
102    $('.abe-item').hover(
103        // mouse in
104        function () {
105        // first we need to know which <div class="marker"></div> we hovered
106        var index = $('.abe-item').index(this);
107        markers[index].setIcon(highlightedIcon());
108        },
109        // mouse out
110        function () {
111        // first we need to know which <div class="marker"></div> we hovered
112        var index = $('.abe-item').index(this);
113        markers[index].setIcon(normalIcon());
114        }
115    );
116
117        vrpUnits.each(function () {
118            var that = $(this);
119            var icon_base = url_paths.stylesheet_dir_url + '/vrp/images/';
120
121            if (that.data('vrp-latitude') == '') {
122                geocoder.geocode({'address': that.data('vrp-address1')}, function (results, status) {
123                    if (status == google.maps.GeocoderStatus.OK) {
124                        bounds.extend(results[0].geometry.location);
125
126                        marker = new google.maps.Marker({
127                            map: map,
128                            position: new google.maps.LatLng(Lat, Long),
129                            icon: icon_base + 'ico-pin.png'
130                        });
131                    }
132                });
133            } else {
134                marker = new google.maps.Marker({
135                    map: map,
136                    position: new google.maps.LatLng(parseFloat(that.data('vrp-latitude')), parseFloat(that.data('vrp-longitude'))),
137                    icon: icon_base + 'ico-pin.png'
138                });
139            }
140
141            var unitInfoWindowContent = `
142            <div class="container-fluid" style="max-width: 200px;">
143                <div class="row marker-infobox">
144                    <div class="col-12"><a href="${that.data('vrp-url')}"><img src="${that.data('vrp-thumbnail')}"></a></div>                    
145                    <div class="col-12 text-center"><h5><a href="${that.data('vrp-url')}">${that.data('vrp-name')}</a></h5></div>`
146
147                    console.log(that.data);
148
149                    if(that.data('vrp-rating')) {
150                        unitInfoWindowContent += `
151                        <div class="col-12 pt-2">
152                            <div class="star-rating d-flex justify-content-center" title="">
153                                <div class="back-stars">
154                                    <i class="fa fa-star" aria-hidden="true"></i>
155                                    <i class="fa fa-star" aria-hidden="true"></i>
156                                    <i class="fa fa-star" aria-hidden="true"></i>
157                                    <i class="fa fa-star" aria-hidden="true"></i>
158                                    <i class="fa fa-star" aria-hidden="true"></i>
159                                    
160                                    <div class="front-stars" style="width: ${that.data('vrp-rating')}%">
161                                        <i class="fa fa-star" aria-hidden="true"></i>
162                                        <i class="fa fa-star" aria-hidden="true"></i>
163                                        <i class="fa fa-star" aria-hidden="true"></i>
164                                        <i class="fa fa-star" aria-hidden="true"></i>
165                                        <i class="fa fa-star" aria-hidden="true"></i>
166                                    </div>
167                                </div>
168                            </div>
169                        </div>`;
170                    }
171                    unitInfoWindowContent += `
172                    <div class="col-12 icons-map">
173                        <span><i class="fas fa-bed"></i> ${that.data('vrp-beds')}</span> 
174                        <span><i class="fas fa-bath"></i> ${that.data('vrp-baths')}</span> 
175                        <span><i class="fas fa-user-friends"></i> ${that.data('vrp-sleeps')}</span> 
176                    </div>                       
177                </div>
178            </div>
179            `;
180
181            bounds.extend(marker.position);
182            map.fitBounds(bounds, 0);
183
184            markers.push(marker);
185
186            google.maps.event.addListener(marker, 'click', (function (marker) {
187                return function () {
188                    infowindow.setContent(unitInfoWindowContent);
189                    infowindow.open(map, marker);
190                }
191            })(marker));
192        });
193        }
194    });
195
196}(jQuery, window));

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.