PageSourceSearch

https://laserliponearme.com/wp-content/themes/listingpro/assets/js/singlepostmap.js

js laserliponearme.com collected 2026-10-07 01:38:10 UTC 11,818 bytes, 299 lines download raw bytes

1$siteURL = jQuery('#page').data("site-url");
2$pinicon = jQuery('#singlepostmap').data('pinicon');
3$mapboxDesign = jQuery('#page').data("mstyle");
4if ($pinicon === "") {
5    $pinicon = $siteURL + "wp-content/themes/listingpro/assets/images/pins/pin.png";
6}
7if (jQuery('.singlebigmaptrigger').length != 0) {
8    $lat = jQuery('.singlebigmaptrigger').data("lat");
9    $lan = jQuery('.singlebigmaptrigger').data("lan");
10    "use strict";
11    $mtoken = jQuery('#page').data("mtoken");
12    $mtype = jQuery('#page').data("mtype");
13    if ($mtype == 'mapbox' || $mtype == 'openstreet') {
14        //new code 2.6.15
15        var mapzoom_opn = 17;
16        if (jQuery('body').is('.single-listing')) {
17            mapzoom_opn = jQuery('body').data('mapzoom');
18        }
19        //end new code 2.6.15
20        L.HtmlIcon = L.Icon.extend({
21            options: {
22                /*
23                html: (String) (required)
24                iconAnchor: (Point)
25                popupAnchor: (Point)
26                */
27            },
28            initialize: function (options) {
29                L.Util.setOptions(this, options);
30            },
31            createIcon: function () {
32                var div = document.createElement('div');
33                div.innerHTML = this.options.html;
34                if (div.classList)
35                    div.classList.add('leaflet-marker-icon');
36                else
37                    div.className += ' ' + 'leaflet-marker-icon';
38                return div;
39            },
40            createShadow: function () {
41                return null;
42            }
43        });
44        if ($mtoken != '' && $mtype == 'mapbox') {
45            L.mapbox.accessToken = $mtoken;
46            var map = L.mapbox.map('singlepostmap')
47                .setView([$lat, $lan], mapzoom_opn); //new code 2.6.15
48            L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
49                id: jQuery('#page').data("mstyle"),
50                accessToken: jQuery('#page').data("mtoken")
51            }).addTo(map);
52        } else if ($mtype == 'openstreet') {
53            var map = new L.Map('singlepostmap', '').setView(new L.LatLng($lat, $lan), mapzoom_opn); //new code 2.6.15
54            L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
55        }
56        var markers = new L.MarkerClusterGroup();
57        var markerLocation = new L.LatLng($lat, $lan); // London
58        var CustomHtmlIcon = L.HtmlIcon.extend({
59            options: {
60                html: "<div class='lpmap-icon-shape pin '><div class='lpmap-icon-contianer'><img alt='image' src='" + $pinicon + "'  /></div></div>",
61            }
62        });
63        var customHtmlIcon = new CustomHtmlIcon();
64        var marker = new L.Marker(markerLocation, { icon: customHtmlIcon }).bindPopup('').addTo(map);
65        markers.addLayer(marker);
66        map.fitBounds(markers.getBounds());
67        map.scrollWheelZoom.disable();
68        map.invalidateSize();
69        map.setZoom(mapzoom_opn); //new code 2.6.15
70
71    } else {
72        if ($lan != '' && $lat != '') {
73            function init() {
74                var e = {
75                    zoom: 17,
76                    scrollwheel: !1,
77                    center: new google.maps.LatLng($lat, $lan),
78                    styles: [{
79                        featureType: "administrative",
80                        elementType: "labels.text.fill",
81                        stylers: [{
82                            color: "#444444"
83                        }]
84                    },
85                    {
86                        featureType: "landscape",
87                        elementType: "all",
88                        stylers: [{
89                            color: "#f2f2f2"
90                        }]
91                    },
92                    {
93                        featureType: "poi",
94                        elementType: "all",
95                        stylers: [{
96                            visibility: "off"
97                        }]
98                    },
99                    {
100                        featureType: "road",
101                        elementType: "all",
102                        stylers: [{
103                            saturation: -100
104                        },
105                        {
106                            lightness: 45
107                        }
108                        ]
109                    },
110                    {
111                        featureType: "road.highway",
112                        elementType: "all",
113                        stylers: [{
114                            visibility: "simplified"
115                        }]
116                    },
117                    {
118                        featureType: "road.arterial",
119                        elementType: "labels.icon",
120                        stylers: [{
121                            visibility: "off"
122                        }]
123                    },
124                    {
125                        featureType: "transit",
126                        elementType: "all",
127                        stylers: [{
128                            visibility: "off"
129                        }]
130                    },
131                    {
132                        featureType: "water",
133                        elementType: "all",
134                        stylers: [{
135                            color: "#b7ecf0"
136                        },
137                        {
138                            visibility: "on"
139                        }
140                        ]
141                    }
142                    ]
143                },
144                    l = document.getElementById("singlepostmap"),
145                    t = new google.maps.Map(l, e);
146                new google.maps.Marker({
147                    position: new google.maps.LatLng($lat, $lan),
148                    icon: "" + $pinicon + "",
149                    map: t,
150                    title: ""
151                })
152            }
153            google.maps.event.addDomListener(window, "load", init);
154        }
155    }
156}
157if (jQuery('#lp-map-hide-show').length != 0) {
158    $elat = jQuery('#eventmap-popup').data("lat");
159    $elan = jQuery('#eventmap-popup').data("lan");
160    $pinicon = jQuery('#eventmap-popup').data("pinicon");
161    "use strict";
162    $mtoken = jQuery('#page').data("mtoken");
163    $mtype = jQuery('#page').data("mtype");
164    if ($mtype == 'mapbox' || $mtype == 'openstreet') {
165        L.HtmlIcon = L.Icon.extend({
166            options: {
167                /*
168                html: (String) (required)
169                iconAnchor: (Point)
170                popupAnchor: (Point)
171                */
172            },
173            initialize: function (options) {
174                L.Util.setOptions(this, options);
175            },
176            createIcon: function () {
177                var div = document.createElement('div');
178                div.innerHTML = this.options.html;
179                if (div.classList)
180                    div.classList.add('leaflet-marker-icon');
181                else
182                    div.className += ' ' + 'leaflet-marker-icon';
183                return div;
184            },
185            createShadow: function () {
186                return null;
187            }
188        });
189        if ($mtoken != '' && $mtype == 'mapbox') {
190            L.mapbox.accessToken = $mtoken;
191            var map = L.mapbox.map('eventmap-popup')
192                .setView([$elat, $lean], 17);
193            L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
194                id: jQuery('#page').data("mstyle"),
195                accessToken: jQuery('#page').data("mtoken")
196            }).addTo(map);
197        } else {
198            var map = new L.Map('eventmap-popup', '').setView(new L.LatLng($lat, $lan), 17);
199            L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
200        }
201        var markers = new L.MarkerClusterGroup();
202        var markerLocation = new L.LatLng($elat, $elan); // London
203        var CustomHtmlIcon = L.HtmlIcon.extend({
204            options: {
205                html: "<div class='lpmap-icon-shape pin '><div class='lpmap-icon-contianer'><img alt='image' src='" + $pinicon + "'  /></div></div>",
206            }
207        });
208        var customHtmlIcon = new CustomHtmlIcon();
209        var marker = new L.Marker(markerLocation, { icon: customHtmlIcon }).bindPopup('').addTo(map);
210        markers.addLayer(marker);
211        map.fitBounds(markers.getBounds());
212        map.scrollWheelZoom.disable();
213        map.invalidateSize();
214    } else {
215        if ($elan != '' && $elat != '') {
216            function init_event() {
217                var e = {
218                    zoom: 17,
219                    scrollwheel: !1,
220                    center: new google.maps.LatLng($elat, $elan),
221                    styles: [{
222                        featureType: "administrative",
223                        elementType: "labels.text.fill",
224                        stylers: [{
225                            color: "#444444"
226                        }]
227                    },
228                    {
229                        featureType: "landscape",
230                        elementType: "all",
231                        stylers: [{
232                            color: "#f2f2f2"
233                        }]
234                    },
235                    {
236                        featureType: "poi",
237                        elementType: "all",
238                        stylers: [{
239                            visibility: "off"
240                        }]
241                    },
242                    {
243                        featureType: "road",
244                        elementType: "all",
245                        stylers: [{
246                            saturation: -100
247                        },
248                        {
249                            lightness: 45
250                        }
251                        ]
252                    },
253                    {
254                        featureType: "road.highway",
255                        elementType: "all",
256                        stylers: [{
257                            visibility: "simplified"
258                        }]
259                    },
260                    {
261                        featureType: "road.arterial",
262                        elementType: "labels.icon",
263                        stylers: [{
264                            visibility: "off"
265                        }]
266                    },
267                    {
268                        featureType: "transit",
269                        elementType: "all",
270                        stylers: [{
271                            visibility: "off"
272                        }]
273                    },
274                    {
275                        featureType: "water",
276                        elementType: "all",
277                        stylers: [{
278                            color: "#b7ecf0"
279                        },
280                        {
281                            visibility: "on"
282                        }
283                        ]
284                    }
285                    ]
286                },
287                    l = document.getElementById("eventmap-popup"),
288                    t = new google.maps.Map(l, e);
289                new google.maps.Marker({
290                    position: new google.maps.LatLng($elat, $elan),
291                    icon: "" + $pinicon + "",
292                    map: t,
293                    title: ""
294                })
295            }
296            google.maps.event.addDomListener(window, "load", init_event);
297        }
298    }
299}

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.