PageSourceSearch

https://www.dollarselfstorage.com/storelocator/findastore.js

js dollarselfstorage.com collected 2026-10-08 03:28:21 UTC 5,276 bytes, 146 lines download raw bytes

1var map;
2var geocoder;
3var centerlat = 0;
4var centerlng = 0;
5var zoomscale = 15;
6
7function popup() {
8    alert("No results found, please try increasing the radius or try another location.")
9}
10function load(a, b, c) {
11    if (GBrowserIsCompatible()) {
12        geocoder = new GClientGeocoder();
13        map = new GMap2(document.getElementById('map'));
14        map.addControl(new GLargeMapControl());
15        map.addControl(new GMapTypeControl());
16        G_NORMAL_MAP.getMinimumResolution = function () {
17            return 1
18        };
19        G_NORMAL_MAP.getMaximumResolution = function () {
20            return 18
21        };
22        centerlat = a;
23        centerlng = b;
24        zoomscale = c
25    }
26}
27function prepareAddress(a) {
28    var b;
29    b = a.lat() + ',' + a.lng();
30    return b
31}
32function getDirectionsURL(a) {
33    var b = prepareAddress(a);
34    var c = 'http://maps.google.com/?q=' + b;
35    return c
36}
37function createMarker(a, b, c, d) {
38    var e = new GMarker(a);
39    var f = getDirectionsURL(a);
40    var g = '<b>' + b + '</b> <br>' + c + '<br>' + '<a href="' + d + '" target="_parent">Detaillls</a>' + ' - ' + '<a href="' + f + '" target="_blank">Directions</a>';
41    GEvent.addListener(e, 'click', function () {
42        e.openInfoWindowHtml(g)
43    });
44    return e
45}
46function createSidebarEntry(a, b, c, d, e, f) {
47    var g = document.createElement('div');
48    var h = e.toFixed(1);
49    var i = '';
50    if (h != 'NaN') {
51        i = '<b>' + c + '</b> (' + h + ' miles)<br><br>' + d + '<br><br>' + '<a href="' + f + '" target="_parent">Detaillls</a>' + ' - ' + '<a href="' + getDirectionsURL(b) + '" target="_blank">Directions</a>'
52    } else {
53        i = '<b>' + c + '</b>' + '<br>' + d + '<br>' + '<a href="' + f + '" target="_parent">Detaillls</a>' + ' - ' + '<a href="' + getDirectionsURL(b) + '" target="_blank">Directions</a>'
54    }
55    g.innerHTML = i;
56   /* g.style.cursor = 'pointer';
57    g.style.marginBottom = '0';
58    GEvent.addDomListener(g, 'click', function () {
59        GEvent.trigger(a, 'click')
60    });
61    GEvent.addDomListener(g, 'mouseover', function () {
62        g.style.backgroundColor = '#eee'
63    });
64    GEvent.addDomListener(g, 'mouseout', function () {
65        g.style.backgroundColor = '#fff'
66    });*/
67    return g
68} 
69function searchLocationsNear(o) { 
70    var p = document.getElementById('radiusSelect').value; 
71    var q = '/storelocator/storelocator_genxml.php?lat=' + o.lat() + '&lng=' + o.lng() + '&radius=' + p;
72    var r = [];
73    GDownloadUrl(q, function (a) {
74        var b = GXml.parse(a);
75        var c = b.documentElement.getElementsByTagName('marker');
76        var d = document.getElementById('sidebar');
77        d.innerHTML = '';
78        if (c.length == 0) {
79            d.innerHTML = '<strong>No results found.</strong>';
80            popup();
81            return
82        }
83        map.clearOverlays();
84        var e = new google.maps.LatLngBounds()();
85        map.clearOverlays();
86        for (var i = 0; i < c.length; i++) {
87            var f = c[i].getAttribute('name');
88            var g = c[i].getAttribute('address');
89            var h = c[i].getAttribute('url');
90            var j = parseFloat(c[i].getAttribute('distance'));
91            var k = new google.maps.LatLng(parseFloat(c[i].getAttribute('lat')), parseFloat(c[i].getAttribute('lng')));
92            var l = createMarker(k, f, g, h);
93            r[i] = l;
94            var m = createSidebarEntry(l, k, f, g, j, h);
95            d.appendChild(m);
96            e.extend(k)
97        }
98        var n = new MarkerClusterer(map, r);
99        map.setCenter(e.getCenter(), map.getBoundsZoomLevel(e))
100    })
101}
102function searchLocations() {
103    var b = document.getElementById('addressInput').value;
104    geocoder.getLatLng(b, function (a) {
105        if (!a) {
106            alert(b + ' not found')
107        } else {
108            searchLocationsNear(a)
109        }
110    })
111}
112function populateMap() {
113    setTimeout(populateMap2, 500)
114}
115function populateMap2() {
116    var o = '/storelocator/storelocator_genxml-mappop.php';
117    GDownloadUrl(o, function (a) {
118        map.clearOverlays();
119        var b = GXml.parse(a);
120        var c = b.documentElement.getElementsByTagName('marker');
121        var d = document.getElementById('sidebar');
122        d.innerHTML = '<strong>Please enter a nearby address above and search, or click on the markers on the map.</strong>';
123        if (c.length == 0) {
124            d.innerHTML = 'No results found.';
125            return
126        }
127        var e = new google.maps.LatLngBounds();
128        map.clearOverlays();
129        var f = [];
130        for (var i = 0; i < c.length; i++) {
131            var g = c[i].getAttribute('name');
132            var h = c[i].getAttribute('address');
133            var j = c[i].getAttribute('url');
134            var k = parseFloat(c[i].getAttribute('distance'));
135            var l = new GLatLng(parseFloat(c[i].getAttribute('lat')), parseFloat(c[i].getAttribute('lng')));
136            var m = createMarker(l, g, h, j);
137            f[i] = m;
138            e.extend(l)
139        }
140        var n = new MarkerClusterer(map, f);
141        map.setCenter(e.getCenter(), map.getBoundsZoomLevel(e));
142        if ((centerlat != 0) && (centerlng != 0)) {
143            map.setCenter(new GLatLng(centerlat, centerlng), zoomscale)
144        }
145    })
146}

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.