D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
hrfiudwx
/
enterpriseuplift.com
/
wp-content
/
themes
/
themify-ultra
/
themify
/
js
/
modules
/
Filename :
bing-map.js
back
Copy
var ThemifyBingMap;((e,i,l)=>{"use strict";let n=null,o=null,a=n=>{const a=n=>{const o=Microsoft.Maps;for(let a=n.length-1;a>-1;--a){let t=n[a];e.requestIdleCallback((()=>{const e=t.dataset,n=e.address.split(","),a=o.MapTypeId,c=e.infoWindow,s=new o.Map(t,{disableBirdseye:!0,disableScrollWheelZoom:"1"!==e.scroll,showDashboard:1!==e.control,credentials:l.bing_map_key,disablePanning:"1"!==e.drag,zoom:~~e.zoom,mapTypeId:a[e.type]||a.aerial});new o.Search.SearchManager(s).geocode({where:n,count:1,userData:{map:s,info:c},callback(e,l){if(e?.results?.length>0){const n=l.map,a=l.info;n.setView({center:e.results[0].bestView.center});const t=new o.Pushpin(n.getCenter(),null);if(a){const e=new o.Infobox(n.getCenter(),{description:a,visible:!1});e.setMap(n),i.Microsoft.Maps.Events.addHandler(t,"click",(()=>{e.setOptions({visible:!0})}))}n.entities.push(t)}}})}),1e3*(a+1))}};null===o?Microsoft.Maps.loadModule("Microsoft.Maps.Search",(()=>{o=!0,a(n)}).bind(null,n)):a(n)};ThemifyBingMap=()=>{n=!0,e.trigger("themify_bing_map_loaded")},e.on("tf_bmap_init",(o=>{null===n&&"object"!=typeof i.Microsoft?.Maps?e.loadJs("//www.bing.com/api/maps/mapcontrol?callback=ThemifyBingMap&key="+(l.bing_map_key||""),null,!1).then((()=>{!0===n?a(bing):e.on("themify_bing_map_loaded",a.bind(null,o),!0)})):(n=!0,a(o))}))})(Themify,window,themify_vars);