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

2 lines
13 KiB
JavaScript
Raw Normal View History

2020-01-29 11:34:56 +01:00
!function(e){var t={};function o(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.l=!0,i.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 i in e)o.d(n,i,function(t){return e[t]}.bind(null,i));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="/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"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=(o("./src/scss/_components/_ui.map.scss"),o("./src/js/_consts.js")),l=function(){function e(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)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();!function(e){var t="jsMapAPI",o=t,n=e("body"),i=s.a.MAP_DRIVER,a=window,c=function(){function s(a){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s);var l=this,c=new i;l.$el=e(a);var u=l.$el,f=u.data();f.center=[f.lng?f.lng:n.data("default-lng"),f.lat?f.lat:n.data("default-lat")],f["font-family"]=n.css("font-family"),console.log(t+": initializing "+c.getName()+"..."),c.init(u,f),l.drv=c,u.on(r.a.MAPAPILOADED,(function(e){l.map=c.getMap(),f.geojson?(console.log(t+": setting up geocode data"),c.addGeoJson(f)):f.address?(console.log(f.address),console.log(t+": setting up address marker"),c.geocode(f.address,(function(e){console.log(e)}))):f.lat&&f.lng&&(console.log(t+": setting up single lat/lng marker"),f.icon||(f.icon='<i class="fas fa-map-marker-alt"></i>'),c.addMarker([f.lng,f.lat],f)),u.data(o,l),u.addClass(t+"-active"),u.trigger(r.a.MAPLOADED),console.log(t+": Map is loaded")}))}return l(s,[{key:"getMap",value:function(){return ui.map}},{key:"dispose",value:function(){this.$el=null,e.removeData(this.$el[0],o),this.$el.removeClass(t+"-active")}}],[{key:"_jQueryInterface",value:function(){if(void 0!==a.localStorage)return this.each((function(){var t=e(this),n=t.data(o);n||(n=new s(this),t.data(o,n))}))}}]),s}();e.fn[t]=c._jQueryInterface,e.fn[t].Constructor=c,e.fn[t].noConflict=function(){return e.fn[t]=JQUERY_NO_CONFLICT,c._jQueryInterface},e(a).on(r.a.AJAX+" "+r.a.LOADED,(function(){e(".mapAPI-map-container").jsMapAPI()}))}(i.a)},"./src/js/_consts.js":function(e,t,o){"use strict";var n=o("jquery"),i=o.n(n),a=o("./src/js/_events.js"),r=o.n(a),s=function(){function e(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)}}return function(t,o,n){return o&&e(t.prototype,o),n&&e(t,n),t}}();var l={init:function(){return function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var o=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),n=o;return n.setMap(e.map),n.position=e.position,n.html=e.html?e.html:'<div class="mapboxgl-marker"><i class="marker-icon fas fa-map-marker-alt"></i></div>',n.divClass=e.divClass,n.align=e.align,n.isDebugMode=e.debug,n.onClick=e.onClick,n.onMouseOver=e.onMouseOver,n.isBoolean=function(e){return"boolean"==typeof e},n.isNotUndefined=function(e){return void 0!==e},n.hasContent=fu
//# sourceMappingURL=app_Site.Controllers.MapElementController.js.map