Файловый менеджер - Редактировать - /home/kunzqhe/photostocker/wp-content/themes/themify-ultra/themify/js/modules/map.min.js
Назад
var ThemifyGoogleMap,ThemifyBingMap;((c,g,l)=>{"use strict";let e=null,s=null,m=null,o=null,p=a=>{if(null===m){m=new google.maps.Geocoder;const e=document.createElement("style");e.textContent=".gmnoprint{overflow-wrap:normal}.themify_builder_map_info_window{color:#000}",document.head.appendChild(e)}for(let e=a.length-1;-1<e;--e){let r=a[e];r.classList.contains("tf_map_loaded")||(r.classList.add("tf_map_loaded"),c.requestIdleCallback(()=>{let e=new google.maps.LatLng(-34.397,150.644),a=r.dataset.address,o=r.dataset.type,t=r.dataset.reverseGeocoding,n=null,s,p=c.isTouch?"0"!==r.dataset.mdrag:"1"===r.dataset.drag,l=p&&"1"===r.dataset.scroll,i={zoom:parseInt(r.dataset.zoom),center:e,mapTypeId:google.maps.MapTypeId.ROADMAP,gestureHandling:p?l?"auto":"cooperative":"none",disableDefaultUI:"1"===r.dataset.control};switch(o.toUpperCase()){case"ROADMAP":i.mapTypeId=google.maps.MapTypeId.ROADMAP;break;case"SATELLITE":i.mapTypeId=google.maps.MapTypeId.SATELLITE;break;case"HYBRID":i.mapTypeId=google.maps.MapTypeId.HYBRID;break;case"TERRAIN":i.mapTypeId=google.maps.MapTypeId.TERRAIN;break}let d=new google.maps.Map(r,i);if(google.maps.event.addListenerOnce(d,"idle",()=>{c.trigger("themify_map_loaded",[r,d])}),r.dataset.gmap_object=d,t&&"false"!==t){let e=a.split(",",2);n=new google.maps.LatLng(parseFloat(e[0]),parseFloat(e[1])),s={latLng:n}}else s={address:a};m.geocode(s,(e,a)=>{if(a==google.maps.GeocoderStatus.OK){const o=null!==n?n:e[0].geometry.location,t=new google.maps.Marker({map:d,position:o}),s=r.dataset.infoWindow;if(d.setCenter(o),s){const p='<div class="themify_builder_map_info_window">'+s+"</div>",l=new google.maps.InfoWindow({content:p});g.google.maps.event.addListener(t,"click",()=>{l.open(d,t)})}}})},-1,1e3*(e+1)))}},n=e=>{const a=a=>{for(let e=a.length-1;-1<e;--e){let p=a[e];c.requestIdleCallback(()=>{const e=p.dataset.address.split(","),a=p.dataset.type,o=p.dataset.infoWindow,t={disableBirdseye:!0,disableScrollWheelZoom:"1"!==p.dataset.scroll,showDashboard:1!==p.dataset.control,credentials:l.bing_map_key,disablePanning:"1"!==p.dataset.drag,zoom:parseInt(p.dataset.zoom)};switch(a){case"aerial":t.mapTypeId=Microsoft.Maps.MapTypeId.aerial;break;case"road":t.mapTypeId=Microsoft.Maps.MapTypeId.road;break;case"streetside":t.mapTypeId=Microsoft.Maps.MapTypeId.streetside;break;case"canvasDark":t.mapTypeId=Microsoft.Maps.MapTypeId.canvasDark;break;case"canvasLight":t.mapTypeId=Microsoft.Maps.MapTypeId.canvasLight;break;case"birdseye":t.mapTypeId=Microsoft.Maps.MapTypeId.birdseye;break;case"ordnanceSurvey":t.mapTypeId=Microsoft.Maps.MapTypeId.ordnanceSurvey;break;case"grayscale":t.mapTypeId=Microsoft.Maps.MapTypeId.grayscale;break}let s=new Microsoft.Maps.Map(p,t);((e,s,p,a)=>{e.geocode({where:a,count:1,userData:{map:s,info:p},callback(e,a){if(0<e?.results?.length){s=a.map,p=a.info,s.setView({center:e.results[0].bestView.center});const o=new Microsoft.Maps.Pushpin(s.getCenter(),null);if(p){const t=new Microsoft.Maps.Infobox(s.getCenter(),{description:p,visible:!1});t.setMap(s),g.Microsoft.Maps.Events.addHandler(o,"click",e=>{t.setOptions({visible:!0})})}s.entities.push(o)}}})})(new Microsoft.Maps.Search.SearchManager(s),s,o,e)},1e3*(e+1))}};null===o?Microsoft.Maps.loadModule("Microsoft.Maps.Search",function(){o=!0,a(e)}.bind(null,e)):a(e)};ThemifyGoogleMap=function(){e=!0,c.trigger("themify_google_map_loaded")},ThemifyBingMap=function(){s=!0,c.trigger("themify_bing_map_loaded")},c.on("tf_map_init",a=>{const o=[],t=[];for(let e=a.length-1;-1<e;--e)(a[e].classList.contains("themify_bing_map")?t:o).push(a[e]);a=null,0<o.length&&(null!==e||g.google&&"object"==typeof g.google.maps?(e=!0,p(o)):(l.map_key||(l.map_key=""),c.loadJs("//maps.googleapis.com/maps/api/js?callback=ThemifyGoogleMap&key="+l.map_key,null,!1).then(()=>{!0===e?p(o):c.on("themify_google_map_loaded",p.bind(null,o),!0)}))),0<t.length&&(g.Microsoft&&"object"==typeof g.Microsoft.Maps?n(t):(l.bing_map_key||(l.bing_map_key=""),c.loadJs("//www.bing.com/api/maps/mapcontrol?callback=ThemifyBingMap&key="+l.bing_map_key,null,!1).then(()=>{!0===s?n(t):c.on("themify_bing_map_loaded",n.bind(null,t),!0)})))})})(Themify,window,themify_vars);
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Генерация страницы: 0 |
proxy
|
phpinfo
|
Настройка