PluginProbe
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder / 2.14.0
aBlocks – Gutenberg Blocks, User Dashboard Builder, Popup Builder, Form Builder & Animation Builder v2.14.0
2.14.0 2.13.0 2.13.1 2.12.0 2.11.1 2.11.0 2.10.0 2.9.0 2.7.4 2.7.5 2.7.6 2.7.7 2.8.0 2.8.1 2.9.1 trunk 1.0 1.0-beta1 1.0-beta2 1.0-beta3 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 All 81 releases
← All changes | assets/build/blocks/map/view.js +3 -1 2.8.0 → 2.14.0 View file →
@@ -1 +1,3 @@
1 -document.addEventListener("DOMContentLoaded",function(){if(window?.ABlocksGlobal&&window?.ABlocksGlobal?.is_gutenberg_editor)return;const o=document.querySelectorAll(".ablocks-map-block");o.length&&o.forEach(o=>{((o,e)=>{const t=e.iconHeight,n=e.iconWidth,r=L.layerGroup();e.mapMarkerList.forEach(function(o){let i="";if(""!==o.title&&(i+="<h6>"+o.title+"</h6>"),""!==o.content&&(i+="<p>"+o.content+"</p>"),"custom"===o.iconType){const e=new(L.Icon.extend({options:{iconSize:[o.customIconWidth,o.customIconHeight],popupAnchor:[0,-15]}}))({iconUrl:o.customIconUrl});""!==o.title||""!==o.content?L.marker([o.lat,o.lng],{icon:e}).bindPopup(i).addTo(r):L.marker([o.lat,o.lng],{icon:e}).addTo(r)}else""!==o.title||""!==o.content?L.marker([o.lat,o.lng],{icon:new L.Icon({iconUrl:e?.defaultMarkerIcon,iconSize:[n,t],popupAnchor:[0,-15]})}).bindPopup(i).addTo(r):L.marker([o.lat,o.lng],{icon:new L.Icon({iconUrl:e?.defaultMarkerIcon,iconSize:[n,t],popupAnchor:[0,-15]})}).addTo(r)});const i="OSM"===e.mapType?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":"https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i349018013!3m9!2sen-US!3sUS!5e18!12m1!1e47!12m3!1e37!2m1!1ssmartmaps!4e0",a="GM_SATELLITE"===e.mapType?"https://maps.googleapis.com/maps/vt?lyrs=s&x={x}&y={y}&z={z}&key=YOUR_API_KEY":i,c=L.tileLayer(a,{id:"mapbox/light-v9"}),l={zoom:e.mapZoom,zoomControl:!1,layers:[c,r],scrollWheelZoom:e.scrollWheelZoom,dragging:!L.Browser.mobile,tap:!L.Browser.mobile};e.mapMarkerList.length&&e.mapMarkerList[e.centerIndex]&&(l.center=[e.mapMarkerList[e.centerIndex].lat,e.mapMarkerList[e.centerIndex].lng]);const p=L.map(o,l);p.addControl(new L.Control.Fullscreen({position:"topleft"})),L.control.zoom({position:"topright"}).addTo(p)})(o,JSON.parse(o.getAttribute("data-settings")))})});
1 +(()=>{"use strict";document.addEventListener("DOMContentLoaded",function(){window?.ABlocksGlobal&&window?.ABlocksGlobal?.is_gutenberg_editor||function(o,t,e="ablocksInitialized"){o&&("function"==typeof o.forEach?o:[o]).forEach(o=>{o&&o.dataset&&!o.dataset[e]&&(o.dataset[e]="1",t(o))})}(document.querySelectorAll(".ablocks-map-block"),o=>{((o,t)=>{const e=t.iconHeight,n=t.iconWidth,a=L.layerGroup();t.mapMarkerList.forEach(function(o){let i="";if(""!==o.title&&(i+="<h6>"+o.title+"</h6>"),""!==o.content&&(i+="<p>"+o.content+"</p>"),"custom"===o.iconType){const t=new(L.Icon.extend({options:{iconSize:[o.customIconWidth,o.customIconHeight],popupAnchor:[0,-15]}}))({iconUrl:o.customIconUrl});""!==o.title||""!==o.content?L.marker([o.lat,o.lng],{icon:t}).bindPopup(i).addTo(a):L.marker([o.lat,o.lng],{icon:t}).addTo(a)}else""!==o.title||""!==o.content?L.marker([o.lat,o.lng],{icon:new L.Icon({iconUrl:t?.defaultMarkerIcon,iconSize:[n,e],popupAnchor:[0,-15]})
2 +}).bindPopup(i).addTo(a):L.marker([o.lat,o.lng],{icon:new L.Icon({iconUrl:t?.defaultMarkerIcon,iconSize:[n,e],popupAnchor:[0,-15]})}).addTo(a)});const i="OSM"===t.mapType?"https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png":"https://maps.googleapis.com/maps/vt?pb=!1m5!1m4!1i{z}!2i{x}!3i{y}!4i256!2m3!1e0!2sm!3i349018013!3m9!2sen-US!3sUS!5e18!12m1!1e47!12m3!1e37!2m1!1ssmartmaps!4e0",r="GM_SATELLITE"===t.mapType?"https://maps.googleapis.com/maps/vt?lyrs=s&x={x}&y={y}&z={z}&key=YOUR_API_KEY":i,c=L.tileLayer(r,{id:"mapbox/light-v9"}),l={zoom:t.mapZoom,zoomControl:!1,layers:[c,a],scrollWheelZoom:t.scrollWheelZoom,dragging:!L.Browser.mobile,tap:!L.Browser.mobile};t.mapMarkerList.length&&t.mapMarkerList[t.centerIndex]&&(l.center=[t.mapMarkerList[t.centerIndex].lat,t.mapMarkerList[t.centerIndex].lng]);const s=L.map(o,l);s.addControl(new L.Control.Fullscreen({position:"topleft"})),L.control.zoom({position:"topright"}).addTo(s)})(o,JSON.parse(o.getAttribute("data-settings")))},"ablocksMapInit")})
3 +})();