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