PageSourceSearch

https://gaithersburglocal.com/wp-content/themes/listingpro/assets/js/singlepostmap-new.js?ver=7.1.2

js gaithersburglocal.com collected 2026-10-02 20:39:11 UTC 4,699 bytes, 94 lines download raw bytes

1$siteURL = jQuery('#page').data("site-url");
2$pinicon = jQuery('#singlepostmap').data('pinicon');
3if ($pinicon === "") {
4    $pinicon = "<i class='fa-solid fa-star'></i>";
5}else{
6	$pinicon = "<img alt='image' src='" + $pinicon + "'  />";
7}
8if (jQuery('#singlepostmap').length != 0) {
9    $lat = jQuery('#singlepostmap').data("lat");
10    $lan = jQuery('#singlepostmap').data("lan");
11    "use strict";
12    $mtoken = jQuery('#page').data("mtoken");
13    $mtype = jQuery('#page').data("mtype");
14    if ($mtype == 'mapbox' || $mtype == 'openstreet') {
15        //new code 2.6.15
16        var mapzoom_opn = 17;
17        if (jQuery('body').is('.single-listing')) {
18            mapzoom_opn = jQuery('body').data('mapzoom');
19        }
20        //end new code 2.6.15
21        /* mapbox */
22        L.HtmlIcon = L.Icon.extend({
23            options: {
24                /*
25                html: (String) (required)
26                iconAnchor: (Point)
27                popupAnchor: (Point)
28                */
29            },
30            initialize: function(options) {
31                L.Util.setOptions(this, options);
32            },
33            createIcon: function() {
34                var div = document.createElement('div');
35                div.innerHTML = this.options.html;
36                if (div.classList)
37                    div.classList.add('leaflet-marker-icon');
38                else
39                    div.className += ' ' + 'leaflet-marker-icon';
40                return div;
41            },
42            createShadow: function() {
43                return null;
44            }
45        });
46        if ($mtoken != '' && $mtype == 'mapbox') {
47            L.mapbox.accessToken = $mtoken;
48            var map = L.mapbox.map('singlepostmap')
49                .setView([$lat, $lan], mapzoom_opn); //new code 2.6.15
50            L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
51                id: jQuery('#page').data("mstyle"),
52                accessToken: jQuery('#page').data("mtoken")
53            }).addTo(map);
54        } else if ($mtype == 'openstreet') {
55            var map = new L.Map('singlepostmap', '').setView(new L.LatLng($lat, $lan), mapzoom_opn); //new code 2.6.15
56            L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png').addTo(map);
57        }
58        var markers = new L.MarkerClusterGroup();
59        var markerLocation = new L.LatLng($lat, $lan); // London
60        var CustomHtmlIcon = L.HtmlIcon.extend({
61            options: {
62                html: "<div class='lpmap-icon-shape pin '><div class='lpmap-icon-contianer'>" + $pinicon + "</div></div>",
63            }
64        });
65        var customHtmlIcon = new CustomHtmlIcon();
66        var marker = new L.Marker(markerLocation, { icon: customHtmlIcon }).bindPopup('').addTo(map);
67        markers.addLayer(marker);
68        map.fitBounds(markers.getBounds());
69        map.scrollWheelZoom.disable();
70        map.invalidateSize();
71        map.setZoom(mapzoom_opn); //new code 2.6.15
72    } else {
73    	$pinicon = jQuery('#singlepostmap').data('pinicon');
74        if ($pinicon === "") {
75            $pinicon = $siteURL + "wp-content/themes/listingpro/assets/images/pins/pin.png";
76        }
77
78        if ($lan != '' && $lat != '') {
79            //new code 2.6.15
80            var mapzoom = 17;
81            if (jQuery('body').is('.single-listing')) {
82                mapzoom = jQuery('body').data('mapzoom');
83            }
84            //end new code 2.6.15
85            function init() {
86                var e = { zoom: mapzoom, scrollwheel: !1, center: new google.maps.LatLng($lat, $lan), styles: [{ featureType: "administrative", elementType: "labels.text.fill", stylers: [{ color: "#444444" }] }, { featureType: "landscape", elementType: "all", stylers: [{ color: "#f2f2f2" }] }, { featureType: "poi", elementType: "all", stylers: [{ visibility: "off" }] }, { featureType: "road", elementType: "all", stylers: [{ saturation: -100 }, { lightness: 45 }] }, { featureType: "road.highway", elementType: "all", stylers: [{ visibility: "simplified" }] }, { featureType: "road.arterial", elementType: "labels.icon", stylers: [{ visibility: "off" }] }, { featureType: "transit", elementType: "all", stylers: [{ visibility: "off" }] }, { featureType: "water", elementType: "all", stylers: [{ color: "#b7ecf0" }, { visibility: "on" }] }] },
87                    l = document.getElementById("singlepostmap"),
88                    t = new google.maps.Map(l, e);
89                new google.maps.Marker({ position: new google.maps.LatLng($lat, $lan), icon: "" + $pinicon + "", map: t, title: "" })
90            }
91            google.maps.event.addDomListener(window, "load", init);
92        }
93    }
94} else {}

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.