Skip to Content

JavaScript File

URL: https://www.diligent.com/-/media/Base-Themes/Google-Maps-JS-Connector/Scripts/optimized-min.js?t=20210806T111240Z
HTTP Status: 200 OK
MIME Type: application/x-javascript
Last Modified: Fri, 06 Aug 2021 11:12:40 GMT
Download Time: Less than a second
Cookies: agcdn_geoinfo={"country_code"
Size: 5 KB
HTTP Headers:  19 headers
Links In:  1 pages
Links Out:  0 links
Images:  0 images
CSS:  0 files
JavaScript:  0 files
  
OK Issues: No issues found

1XA.connector.mapsConnector=function(n,t){"use strict";var r={}

2,e=[],i=[],u,o,s,f=[],h,c=[],a,l=!1;return o=function(n){switch(n.mode){case"Roadmap":return google.maps.MapTypeId.ROADMAP;case"Satellite":return google.maps.MapTypeId.SATELLITE;case"Hybrid":return google.maps.MapTypeId.HYBRID;default:return google.maps.MapTypeId.ROADMAP}

3}

4,s=function(n,t){var i;return i=t.icon===null?new google.maps.Marker({position:new google.maps.LatLng(t.latitude,t.longitude),map:e[n],title:t.title}

5):new google.maps.Marker({position:new google.maps.LatLng(t.latitude,t.longitude),map:e[n],title:t.title,icon:t.icon}

6),t.latitude===""&&t.longitude===""&&i.setVisible(!1),i}

7,h=function(n,t,r){t.id=r.id;i[n]?i[n].push({marker:t,type:r.type}

8):(i[n]=[],i[n].push({marker:t,type:r.type}

9))}

10,r.loadScript=function(n,i){if(c.push(i),!l){l=!0;var r=t.createElement("script"),u="https://maps.googleapis.com/maps/api/js?v=3.exp";r.type="text/javascript";u+=typeof n!="undefined"&&n!==""?"&key="+n+"&v=3.exp&signed_in=false":"&signed_in=false";u+="&libraries=places&callback=XA.connector.mapsConnector.scriptsLoaded";r.src=u;r.onload=function(){console.log("Google loader has been loaded, waiting for maps api")}

11;t.body.appendChild(r)}

12}

13,r.scriptsLoaded=function(){for(var t=c.length,n=0;n<t;n++)c[n].call();l=!1}

14,r.showMap=function(n,r,f){var s,h,c=r.disableMapZoomOnScroll!=="1",l=r.disableMapScrolling!=="1";f instanceof Array?(s={zoom:r.zoom,scrollwheel:c,draggable:l,center:new google.maps.LatLng(f[0],f[1]),mapTypeId:o(r)}

15,u=new google.maps.Map(t.getElementById(r.canvasId),s)):(s={scrollwheel:c,draggable:l,mapTypeId:o(r)}

16,u=new google.maps.Map(t.getElementById(r.canvasId),s),u.fitBounds(f),r.poiCount<2&&(h=google.maps.event.addListener(u,"idle",function(){i.length>0&&i[n].length<2&&(u.setZoom(r.zoom),google.maps.event.removeListener(h))}

17)));h=google.maps.event.addListener(u,"zoom_changed",function(){var n=u.getZoom();n<1&&u.setZoom(1)}

18);e[n]=u}

19,r.renderPoi=function(n,t){var r=s(n,t),i=n+"#"+t.id;h(n,r,t);t.html!==""&&t.html!==null&&(f[i]=new google.maps.InfoWindow({content:t.html}

20));typeof f[i]!="undefined"&&function(t,i){google.maps.event.addListener(i,"click",function(){for(var r in f)f.hasOwnProperty(r)&&f[r].close();f[t].open(e[n],i)}

21)}

22(i,r)}

23,r.renderDynamicPoi=function(n,t,i){var r=s(n,t);h(n,r,t);google.maps.event.addListener(r,"click",function(){if(typeof i=="function"){var o=t.id,s=t.poiTypeId,u=t.poiVariantId;if(u==null)return;i(o,s,u,function(t){f[n]&&f[n].close();f[n]=new google.maps.InfoWindow({content:t.Html}

24);f[n].open(e[n],r)}

25)}

26}

27)}

28,r.clearMarkers=function(n){var t,r;if(i.hasOwnProperty(n)){for(t=i[n],r=0;r<t.length;r++)t[r].type==="Dynamic"&&t[r].marker.setMap(null);i[n]=t.filter(function(n){return n.type==="Static"||n.type==="MyLocation"?!0:!1}

29)}

30}

31,r.updateMapPosition=function(n){var o=e[n],r,u=[],f=new google.maps.LatLngBounds,t;for(i.hasOwnProperty(n)&&(u=i[n]),t=0;t<u.length;t++)r=u[t].marker,f.extend(new google.maps.LatLng(r.position.lat(),r.position.lng()));o.fitBounds(f)}

32,r.centerMap=function(n,t,r,u){var h=e[n],o=[],s,f;if(r&&h.setCenter(new google.maps.LatLng(t.coordinates[0],t.coordinates[1])),u){for(i.hasOwnProperty(n)&&(o=i[n]),f=0;f<o.length;f++)o[f].marker.setAnimation(null),o[f].marker.id===t.id&&(s=o[f].marker,o[f].marker.setMap(null));typeof s!="undefined"&&(s.setMap(h),s.setAnimation(google.maps.Animation.BOUNCE),a=setTimeout(function(){s.setMap(h)}

33,2e3))}

34}

35,r.getCentralPoint=function(n){for(var t,u=n.length,r=new google.maps.LatLngBounds,i=0;i<u;i++)t=n[i],t.latitude!==""&&t.longitude!==""&&r.extend(new google.maps.LatLng(t.latitude,t.longitude));return r}

36,r.locationAutocomplete=function(n,t,i){var u=new google.maps.places.AutocompleteService,r=n.maxResults<=0?1:n.maxResults;u.getQueryPredictions({input:n.text}

37,function(n){var f=[],e,u;if(n!=null&&n.length){for(e=n.length>=r?r:n.length,u=0;u<e;u++)f.push(_.extend(n[u],{text:n[u].description}

38));t(f)}

39else i()}

40)}

...

</html>