webpack-bootstrap-ui-kit/dist/js/app_Site.Controllers.MapElementController.js

2 lines
14 KiB
JavaScript
Raw Normal View History

2020-03-28 16:51:50 +01:00
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,o),a.l=!0,a.exports}o.m=e,o.c=t,o.d=function(e,t,n){o.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},o.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.t=function(e,t){if(1&t&&(e=o(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)o.d(n,a,function(t){return e[t]}.bind(null,a));return n},o.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return o.d(t,"a",t),t},o.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},o.p="/mnt/data/srv/dist/repositories/webpack-bootstrap-ui-kit/dist",o(o.s="./src/js/types/Site.Controllers.MapElementController.js")}({"./src/js/_components/_ui.map.api.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./src/js/_events.js"),i=o.n(r),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js"));function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}!function(e){var t="jsMapAPI",o=e("body"),n=s.a.MAP_DRIVER,a=window,r=function(){function r(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var s=this,c=new n;s.$el=e(a);var l=s.$el,u=l.data();u.center=[u.lng?u.lng:o.data("default-lng"),u.lat?u.lat:o.data("default-lat")],u.style=u.style?jQuery.parseJSON(u.style):null,u["font-family"]=o.css("font-family"),console.log("".concat(t,": initializing ").concat(c.getName(),"...")),c.init(l,u),s.drv=c,l.on(i.a.MAPAPILOADED,(function(e){s.map=c.getMap(),u.geojson?(console.log("".concat(t,": setting up geocode data")),c.addGeoJson(u)):u.address?(console.log(u.address),console.log("".concat(t,": setting up address marker")),c.geocode(u.address,(function(e){console.log(e)}))):u.lat&&u.lng&&(console.log("".concat(t,": setting up single lat/lng marker")),u.icon||(u.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([u.lng,u.lat],u)),l.data("jsMapAPI",s),l.addClass("".concat(t,"-active")),l.trigger(i.a.MAPLOADED),console.log("".concat(t,": Map is loaded"))}))}var s,l,u;return s=r,u=[{key:"_jQueryInterface",value:function(){if("undefined"!==typeof a.localStorage)return this.each((function(){var t=e(this),o=t.data("jsMapAPI");o||(o=new r(this),t.data("jsMapAPI",o))}))}}],(l=[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],"jsMapAPI"),this.$el.removeClass("".concat(t,"-active"))}}])&&c(s.prototype,l),u&&c(s,u),r}();e.fn[t]=r._jQueryInterface,e.fn[t].Constructor=r,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,r._jQueryInterface},e(a).on("".concat(i.a.AJAX," ").concat(i.a.LOADED),(function(){e(".mapAPI-map-container").jsMapAPI()}))}(a.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),a=o.n(n),r=o("./src/js/_events.js"),i=o.n(r);function s(e){return(s="function"===typeof Symbol&&"symbol"===typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"===typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var o=0;o<t.length;o++){var n=t[o];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function l(e,t){return!t||"object"!==s(t)&&"function"!==typeof t?u(e):t}function u(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function p(){if("undefined"===typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"===typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){re
//# sourceMappingURL=app_Site.Controllers.MapElementController.js.map