WME/aufgabe5/public/assets/js/mappa.min.js

8 lines
31 KiB
JavaScript
Raw Normal View History

2019-01-11 11:31:36 +00:00
/**
* Minified by jsDelivr using UglifyJS v3.3.22.
* Original file: /npm/mappa-mundi@0.0.5/dist/mappa.js
*
* Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
*/
!function (t, e) { "object" == typeof exports && "object" == typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : "object" == typeof exports ? exports.Mappa = e() : t.Mappa = e() }(this, function () { return function (o) { var n = {}; function i(t) { if (n[t]) return n[t].exports; var e = n[t] = { i: t, l: !1, exports: {} }; return o[t].call(e.exports, e, e.exports, i), e.l = !0, e.exports } return i.m = o, i.c = n, i.i = function (t) { return t }, i.d = function (t, e, o) { i.o(t, e) || Object.defineProperty(t, e, { configurable: !1, enumerable: !0, get: o }) }, i.n = function (t) { var e = t && t.__esModule ? function () { return t.default } : function () { return t }; return i.d(e, "a", e), e }, i.o = function (t, e) { return Object.prototype.hasOwnProperty.call(t, e) }, i.p = "/dist/", i(i.s = 6) }([function (t, e, o) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var n, i = function () { function n(t, e) { for (var o = 0; o < e.length; o++) { var n = e[o]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, o) { return e && n(t.prototype, e), o && n(t, o), t } }(), r = o(3), a = (n = r) && n.__esModule ? n : { default: n }; var s = function () { function e(t) { !function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, e), this.options = t, this.init() } return i(e, [{ key: "init", value: function () { this.options.pixels = 256, this.options.scale || (this.options.scale = 1), 2 === this.options.scale && (this.options.pixels = 512) } }, { key: "latLngToPixel", value: function (t, e) { return { x: this.fromLngToPoint(e) - this.fromLngToPoint(this.options.lng) + this.options.width / (2 / this.options.scale), y: this.fromLatToPoint(t) - this.fromLatToPoint(this.options.lat) + this.options.height / (2 / this.options.scale) } } }, { key: "fromLatToPoint", value: function (t) { return this.options.pixels / Math.PI * Math.pow(2, this.options.zoom) * (Math.PI - Math.log(Math.tan(Math.PI / 4 + t * Math.PI / 180 / 2))) } }, { key: "fromLngToPoint", value: function (t) { return this.options.pixels / Math.PI * Math.pow(2, this.options.zoom) * (t * Math.PI / 180 + Math.PI) } }], [{ key: "geoJSON", value: function () { return (0, a.default)(arguments.length <= 0 ? void 0 : arguments[0], arguments.length <= 1 ? void 0 : arguments[1]) } }]), e }(); e.default = s }, function (t, e, o) { "use strict"; Object.defineProperty(e, "__esModule", { value: !0 }); var i = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (t) { return typeof t } : function (t) { return t && "function" == typeof Symbol && t.constructor === Symbol && t !== Symbol.prototype ? "symbol" : typeof t }, n = function () { function n(t, e) { for (var o = 0; o < e.length; o++) { var n = e[o]; n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(t, n.key, n) } } return function (t, e, o) { return e && n(t.prototype, e), o && n(t, o), t } }(), r = s(o(3)), a = s(o(13)); function s(t) { return t && t.__esModule ? t : { default: t } } var l = function () { function e(t) { !function (t, e) { if (!(t instanceof e)) throw new TypeError("Cannot call a class as a function") }(this, e), this.options = t, this.mappaDiv = null, this.id = (0, a.default)(), this.srcLoaded = !1 } return n(e, [{ key: "loadSrc", value: function () { var n = this; new Promise(function (t, e) { if (n.scriptTag = document.createElement("script"), document.body.appendChild(n.scriptTag), n.scriptTag.id = n.options.provider, n.scriptTag.onload = t, n.scriptTag.onerror = e, n.scriptTag.async = !0, n.scriptTag.src = n.scriptSrc, n.styleSrc) { var o = document.createElement("link"); document.head.appendChild(o), o.rel = "stylesheet", o.href = n.styleSrc } }).then(function () { n.srcLoaded = !0 }) } }, { key: "overlay", value: function (t, e) { var o = this; void 0 !== t.elt ? this.canvas = t.elt : this.canvas = t
//# sourceMappingURL=/sm/f268bb0b7a8e5c7c2686fecaf67940c4d3a61b569f3589c663fe35d412695dd9.map